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.


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:


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 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.