This documentation is archived and is not being maintained.

Compiler Error CS0239

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

A member cannot override a sealed inherited member.

The following sample generates CS0239:

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

class clx : cly
{
   public static void Main()
   {
   }

   public override sealed void f()
   {
   }
}

class clz : clx
{
   public override void f()   // CS0239
   // Try the following definition instead:
   // public new void f()
   {
   }
}
Show: