I've written a simple C++/CLI DLL that has 2 public static methods:
namespace GetMscVerLib
{
public ref class CGetMscVer
{
static System::Int32 GetCompilerVersion ();
static System::Int32 GetCompilerFullVersion ();
};
}
I'm trying to call these methods from a C# console app in the same solution but the compiler doesn't recognize the methods and shows an error that says that the methods don't "exist in the current context":
namespace Get_MSC_VER
{
class Program
{
static void Main (string[] args)
{
Int32 i32CompilerVersion = CGetMscVer.GetCompilerVersion ();
Int32 i32CompilerFullVersion = CGetMscVer.GetCompilerFullVersion ();
}
}
}
What is the correct syntax? (online searches have produced pages of irrelevant links with some of the search keywords, assuming DllImport or COM). This seems like it should be quite a simple matter but finding it is not.
Thanks