O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying Inheritance

Before explaining how inheritance is applied in code, a graphical representation can be useful. Figure 12.1 shows how you can create robust hierarchies of custom objects with inheritance.

Figure 12.1 A graphical representation of a custom framework of objects using inheritance.

image

You derive a class from a base class using the Inherits keyword. For example, consider the following implementation of the Person class that exposes some basic properties:

image

Inherits System.Object

In the .NET Framework development, every class inherits ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required