我知道用c++写的导出函数在c#里可以如下方式调用: [DllImport("Raster2d.dll", EntryPoint = "getValue", CharSet = CharSet.Ansi)] public extern static int getValue(); 但我现在写了一个dll的导出类,很简单的一个类: class __declspec( dllexport ) Raster2d { public: int x; int y; public: int getValue(