Compiler Error C3283

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3283.

type' : an interface cannot have an instance constructor

A CLR interface cannot have an instance constructor. A static constructor is allowed.

The following sample generates C3283:

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

Possible resolution:

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

Show: