Compiler Error C3923

 

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 C3923.

member' : local class, struct, or union definitions are not allowed in a member function of a WinRT or managed class

The following sample generates C3923.

// C3923.cpp  
// compile with: /clr /c  
ref struct x {  
   void Test() {  
      struct a {};   // C3923  
      class b {};   // C3923  
      union c {};   // C3923  
   }  
};  

Show: