C# Error
CS0575 – Only class types can contain destructors
Reason for the Error & Solution
Only class types can contain destructors
A cannot contain a finalizer.
The following sample generates CS0575:
// CS0575.cs
namespace x
{
public struct iii
{
~iii() // CS0575
{
}
public static void Main()
{
}
}
}