Derived Class Constructors

Regardless of their access modifiers, the constructors of a base class are never inherited by the derived class. Despite this fact, they can still be called from the constructors of the derived class and, in certain cases, the compiler will implicitly provide the necessary call back to a base class constructor. After all, a part of the derived class is from the base class, so the base class constructors are highly suited to initialize the base class part of the derived class.

Note

Like their constructor siblings, destructors are not inherited by the derived class.

Recall from Chapter 13, “Class Anatomy Part II: Object ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.