abstract class Shape { ... } // C#
ref class Shape abstract { ... }; // C++/CLI
strUCt Point2D { ... } // C#
value class Point2D { ... }; // C++/CLI
class native {};
value class V {};
ref class R {};
interface class I {};
enum native { fail, pass };
enum class CLIEnum : char { fail, pass};
int native[] = { 1,1,2,3,5,8 };
array<int>^ managed = { 1,1,2,3,5,8 };
int ival = 1024;
int^ boxedi = ival;
array<int>^ ia = gcnew array<int>{1,1,2,3,5,8};
interior_ptr<int> begin = &ia[0];
value struct smallInt { int m_ival; ... } si;
pin_ptr<int> ppi = &si.m_ival;
新闻热点
疑难解答