/*
Mastering Visual C# .NET
by Jason Price, Mike Gunderloy
Publisher: Sybex;
ISBN: 0782129110
*/
/*
Example5_14.cs illustrates a destructor
*/
// declare the Car class
class Car
{
// define the destructor
~Car()
{
System.Console.WriteLine("In ~Car() destructor");
// do any cleaning up here
}
}
publicclass Example5_14
{
publicstaticvoid Main()
{
// create a Car object
Car myCar = new Car();
System.Console.WriteLine("At the end of Main()");
}
}