Compiler Error CS0250
Do not directly call your base class Finalize method. It is called automatically from your destructor.
A program cannot attempt to force cleanup of base class resources.
See Finalizers for more information. This message uses the previous term for finalizer: destructor.
The following sample generates CS0250
// CS0250.cs
class B
{
}
class C : B
{
~C()
{
base.Finalize(); // CS0250
}
public static void Main()
{
}
}
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: