Your
Add()
function is a member of
Test::Class1
and yet in your C# code you define it as
public static
. Change it to a stand-alone function not in any namespace or class and export its name, like this:
__declspec(dllexport) int Add(int i, int j)
{
return(i + j);
}