Multiple inheritance

Multiple inheritance allows a class to have more than one base class. For example a particular kind of car may be a jeep and a family car at the same time as illustrated in Figure 17.5. The FamilyCarJeep is thus derived from the FamilyCar as well as the Jeep.

Figure 17.5. An example of multiple inheritance

Even though multiple inheritance is a powerful concept, which is supported by languages like C++ and Eiffel it also involves several subtleties that can make its implementation tricky.

NOTE

Multiple inheritance is a heavily ...

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.