Destructor
Destructor is used to destroy objects of class when the scope of an object ends. Like constructor, Destructor name also same as the class name and starts with a tilde(~). Destructor will not have any parameters hence Destructor overloading is not possible. Destructor does not accept any access modifiers. Destructor will be when Program exits.
CODE
EG 1 . Creating Rectangle class with constructor overloads and a destructor.
class Program {
    static void Main() {
        //Invoking constructor with 4 Parameters
        Rectangle wall = new Rectangle(5, 6, 7, 2.8);
        wall.RectangleCalculation();
        Console.WriteLine(); //Giving empty line
        //Invoking constructor with 3 Parameters
        Rectangle cupboard = new Rectangle(7,8,9);
        cupboard.RectangleCalculation();
        Console.WriteLine();
        //Invoking constructor with 1 Parameter
        Rectangle monitor = new Rectangle(10);
        monitor.RectangleCalculation();
        Console.WriteLine();
        //Invoking default constructor.
        Rectangle door = new Rectangle();
        door.RectangleCalculation();
        Console.WriteLine();
    }
}
class Rectangle {
    public double length, width, height, density;
    //Constructor Overloading
    public Rectangle(double l,double w,double h,double d) {
        length = l;
        width = w;
        height = h;
        density = d;
    }
    public Rectangle(double l, double w, double h) {
        length = l;
        width = w;
        height = h;
        density = 1;
    }
    public Rectangle(double l) {
        length = l;
        width = 1;
        height = 1;
        density = 1;
    }
    //Default Constructor
    public Rectangle() {
        length = 1;
        width = 1;
        height = 1;
        density = 1;
    }
    //Destructor
    ~Rectangle() {
        Console.WriteLine("Rectangle class Destructor Invoked");
    }
    public double Area() {
        return length * width;
    }
    public double Perimeter() {
        return 2 * (length+width);
    }
    public double Volume() {
        return Area() * height;
    }
    public double Weight() {
        return Volume() * density;
    }
    public void RectangleCalculation() {
        Console.WriteLine(Area());
        Console.WriteLine(Perimeter());
        Console.WriteLine(Volume());
        Console.WriteLine(Weight());
    }
}
(Click Here, For more exercises)