how can i use c# dll with namespace in c++

S

SDec

Hi
i have this error with this code:
An unhandled exception of type 'System.IO.FileNotFoundException'
please help....
//---------------------------
#include "stdafx.h"
#using <mscorlib.dll>
#using <system.dll>
using namespace System;

#using <TestDLL.dll>
using namespace Ing;
int _tmain(void)
{
double dVal = Ing::MyMath::Add(1.0, 2.0);
Console::WriteLine(dVal);
return 0;
}
//---------------------------
 
R

Ronald Laeremans [MSFT]

At runtime put the DLL in the same directory as the executable depending on
it.

Ronald Laeremans
Visual C++ team

Hi
i have this error with this code:
An unhandled exception of type 'System.IO.FileNotFoundException'
please help....
//---------------------------
#include "stdafx.h"
#using <mscorlib.dll>
#using <system.dll>
using namespace System;

#using <TestDLL.dll>
using namespace Ing;
int _tmain(void)
{
double dVal = Ing::MyMath::Add(1.0, 2.0);
Console::WriteLine(dVal);
return 0;
}
//---------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top