Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0238

'member' cannot be sealed because it is not an override

sealed was used on a member that was not also marked with override. For more information, see Inheritance (C# Programming Guide).

The following sample generates CS0238:

// CS0238.cs
abstract class MyClass
   public abstract void f();

class MyClass2 : MyClass
   public static void Main()

   public sealed void f() // CS0238
   // Try the following definition instead:
   // public override sealed void f()

Community Additions

© 2015 Microsoft