编译器错误 C3283

“类型”: 接口不能包含实例构造函数

CLR 接口 不能包含实例构造函数。 允许使用静态构造函数。

以下示例生成 C3283:

// C3283.cpp
// compile with: /clr
interface class I {
   I();   // C3283
};

可能的解决方法:

// C3283b.cpp
// compile with: /clr /c
interface class I {
   static I(){}
};