Chapter 3. Inheritance

Classes are often related to other classes. The two popular methods of relating classes are containment, also known as composition, and inheritance. Containment is a "has a" relationship, where a class contains or embeds another class. For example, a timestamp contains time. Inheritance is based on the "is a" relationship, in which one class is a type of another class. For example, an hourly employee is a kind of employee.

Inheritance involves a base type and a derived type, where a derived type is a kind ...

Get Programming Microsoft® Visual C#® 2005: The Language 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.