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.
The following sample generates CS0238:
C#
// 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()
{
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: