Compiler Error C3748

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C3748 on docs.microsoft.com. 'interface': managed interfaces may not fire events

The __event keyword cannot appear inside an interface.

The following sample generates C3748:

// C3748.cpp  
__interface I {  
// try the following line instead  
// struct I {  
   __event void f();   // C3748  
};  
  
int main() {  
}  

Show: