Compiler Error CS0574
Name of destructor must match name of class
The name of a finalizer must be the class name preceded by a tilde (~).
The following sample generates CS0574:
// CS0574.cs
namespace x
{
public class iii
{
~iiii() // CS0574
{
}
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: