It (along with the this
keyword) is instructing the constructor to call another constructor within the same type before it, itself executes.
Therefore:
public ListNode(object dataValue)
: this(dataValue, null)
{
}
effectively becomes:
public ListNode(object dataValue)
{
data = dataValue;
next = null;
}
Note that you can use base
instead of this
to instruct the constructor to call a constructor in the base class.