Inheriting from a Class

Inheritance allows you to derive a new class from an existing class. Suppose that class C inherits from class B. Then class B is typically called the base class, and class C is called the derived class. Note that this terminology is not necessarily standard; some refer to B and C as superclass and subclass, or as parent and child classes, respectively. This book will stick with the terms “base” and “derived.”

A derived class definition automatically inherits the implementation and the programming contract of its base class. The idea is that the derived class starts with a reusable class definition and modifies it by adding more members or by changing the behavior of existing methods and properties.

One of the primary reasons ...

Get Building Applications and Components with Visual Basic .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.