Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error CS0239
Collapse the table of content
Expand the table of content

Compiler Error CS0239

'member' : cannot override inherited member 'inherited member' because it is sealed

A member cannot override a sealed inherited member. For more information, see Checked and Unchecked (C# Reference).

The following sample generates CS0239:

// CS0239.cs
abstract class MyClass
{
   public abstract void f();
}

class MyClass2 : MyClass
{
   public static void Main()
   {
   }

   public override sealed void f()
   {
   }
}

class MyClass3 : MyClass2
{
   public override void f()   // CS0239
   // Try the following definition instead:
   // public new void f()
   {
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft