No path is too difficult. No destination is too far !
Posts tagged Constructors
Calling constructor inside constructor in C#
Feb 16th
To call one C# constructor from another, before the body of the constructor, use either:
: base (parameters)
to call a constructor in the base class; or:
: this (parameters)
to call a constructor in this class.
The following examples illustrate how to call one constructor from another.
public class myPopUp
{
public myPopUp(int width, int height, myPopUp parentPopUp) : this (width, height)
{
this.ParentPopUp = parentPopUp;
}
}