Object-Oriented Differences

There are a couple of differences with regard to principles related to the object-oriented programming. Although these principles are discussed in detail in Part 2, “Object-Oriented Programming with Visual Basic 2010,” it’s convenient to have a small reference.

Inheritance

The first one is about inheritance, which is covered in Chapter 12. Classes (that is, reference types) support inheritance, whereas structures (value types) do not. Consider the following code:

image

In this example, the Person class is the base class and provides the basic properties for representing a hypothetical person. The Developer class inherits ...

Get Visual Basic 2010 Unleashed now with O’Reilly online learning.

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