Skip to Content
Visual Basic 2015 Unleashed
book

Visual Basic 2015 Unleashed

by Alessandro Del Sole
July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Sams
Content preview from Visual Basic 2015 Unleashed

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.

Image

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

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:

Public Class Person    Public Property FirstName As String    Public Property LastName As String    'A simplified implementation    Public Function ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Visual Basic 2015

Beginning Visual Basic 2015

Bryan Newsome

Publisher Resources

ISBN: 9780134196664Purchase book