Edit

Share via


Compiler Error C3246

'class' : cannot inherit from 'type' as it has been declared as 'sealed'

A class that is marked as sealed cannot be the base class for any other classes.

The following sample generates C3246:

// C3246_2.cpp
// compile with: /clr /LD
ref class X sealed {};

ref class Y : public X {}; // C3246