Yes it is a destructor and these are available in C#. It will act as an
additional call when Finalize is called on the object by the GC.
It will basically turn the destructor into this:
public override void Finalize()
{
// your destructor code
base.Finalize();
}
base.Finalize() will also call Dispose(true) if the method exists on the
object. It will do this regardless of if there is a destructor provided or
not.
It's usually best to put the tidy up code in a disposing method
public void Dispose(bool disposing)
{
if(disposing)
{
// clean managed resources
}
else
{
// clean unmanaged resources
}
}
For more in-depth information you can read this article here:
http://www.codeproject.com/useritems/idisposable.asp