What does this colon (:) mean?

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 … Read more

Delphi: Understanding constructors

I see two reasons your original set of declarations shouldn’t compile cleanly: There should be a warning in TCellPhone that its constructor hides the method of the base class. This is because the base-class method is virtual, and the compiler worries that you’re introducing a new method with the same name without overriding the base-class … Read more

Initialize field before super constructor runs?

No, there is no way to do this. According to the language specs, instance variables aren’t even initialized until a super() call has been made. These are the steps performed during the constructor step of class instance creation, taken from the link: Assign the arguments for the constructor to newly created parameter variables for this … Read more

C# constructor execution order

The order is: Member variables are initialized to default values for all classes in the hierarchy Then starting with the most derived class: Variable initializers are executed for the most-derived type Constructor chaining works out which base class constructor is going to be called The base class is initialized (recurse all of this 🙂 The … Read more