Constructors are instructions that should be run when an instance of the parent class is created.
For example, if i had this (public MyObjectType is our constructor)
CODE
class MyObjectType {
private int x;
private int y;
public MyObjectType (int x1, int y1) {
x = x1;
y= y1;
}
public void DoSomeCalculation () {
Console.WriteLine("This is my text" + x + y);
}
}
and then somewhere else I did this
CODE
MyObjectType myInstance = new MyObjectType (20,40);
myInstance.DoSomeCalculation ();
I should get
This is my text2040
I might have made an error somewhere, but this is basically how it works.
As for destructors, they are used for garbage collecting. When it is deemed necessary to get rid of it ( it runs out of scope or something) you could have special cleanup instructions in a destructor (which would be ~ followed by the name of your constructor) you must have a constructor if you have a destructor.