Inheritance in C#
C# supports a single inheritance model. Thus a class may derive from a single base class, and not from more than one. (In fact, as we saw earlier in the appendix, every class in C# ultimately derives from the root class System.Object. In C# we may use the alias object for this root class.) This single inheritance model is simple and avoids the complexities and ambiguities associated with multiple inheritance in C++. Although a C# class can inherit only from a single base class, it may inherit from several interfaces, a topic we will discuss later.
Inheritance Fundamentals
With inheritance, you factor the abstractions in your object model and put the more reusable abstractions in a high-level base class. You can add or change ...
Get Programming PERL in the .NET Environment 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.