What Is Inheritance?

Recall that classes contain fields, properties, events, and methods. Inheritance implies at least two classes: one class plays the role of parent and the second class plays the role of child. (Occasionally we refer to sibling classes, those descended from the same parent. Seldom do we refer to a grandparent; generally when we discuss any ancestor beyond an immediate parent, we use the term ancestor.)

Note

A parent class is also referred to as a superclass, and a child class is also referred to as a subclass.

Remember that the same class can be parent or child, depending on your perspective. For example, you are the parent of your children but the child of your parents. If you combine the parent-child relationship with the ...

Get Visual Basic® .NET Unleashed 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.