Compiler Error C3838
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C3838

Error Message

cannot explicitly inherit from 'type'

The specified type cannot act as a base class in any class.

The following sample generates C3838:

// C3838a.cpp
// compile with: /clr /c
public ref class B : public System::Enum {};   // C3838

The following sample generates C3838:

// C3838b.cpp
// compile with: /clr:oldSyntax /c
public __gc class B : public System::ValueType {};   // C3838
© 2015 Microsoft