|
// HelloWorld.h
#using <mscorlib.dll>
#using "CSharpHelloWorld.netmodule"
using namespace System;
// This code wraps the C# class using Managed C++
public __gc class HelloWorldC
{
public:
CSharpHelloWorld __gc *t; // Provide .NET interop and garbage collecting to the pointer.
HelloWorldC() {
t = new CSharpHelloWorld(); // Assign the reference a new instance of the constructor.
}
void callCSharpHelloWorld() {
t->displayHelloWorld();
}
};
|