Object-Oriented Features

For years, VB developers have asked for true object-oriented language features. Finally, with VB.NET, they get their wish. VB.NET supports implementation inheritance, constructors and destructors, method overloading, the new Overrides keyword, and shared members.

Inheritance

How long have you been asking for true inheritance? VB.NET supports inheritance by enabling you to extend the properties and methods of a given base class. When you derive a class in VB.NET, you can also override inherited methods with your own implementation. In VB.NET, all classes are inheritable by default. Listing B.9 shows a simple example of inheritance.

Listing B.9. Simple Inheritance
 1: Imports System 2: 3: Public Class TwoDPoint 4: Public ...

Get Building e-Commerce Sites with the .NET Framework 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.