Constructor chaining is the, efficient, process of calling an implementation of
a constructor from another constructor. This allows class developers to consolidate
constructor logic into a single constructor rather than spreading the construction
code across several constructors or creating a private method. Here is an
example.
public class NamedDataObject
{
public NamedDataObject ( ) : this(0, null)
{ }
public NamedDataObject ( int id ) : this(id, null)
{ }
public NamedDataObject ( string name ) : this(0, name)
{ }
public NamedDataObject ( int id, string name )
{
//Initialization code
}
}