Destructors : Destructor : Class C# Examples


C# Examples » Class » Destructor »

 

Destructors






A destructor method called just prior to an object's final destruction by the garbage collector.
A destructor can be used to ensure that an object terminates cleanly.
Destructors have this general form:





    
~class-name(  )  {
//  destruction  code
}
    
   
  
   

class-name is the name of the class.



HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» Destructor