Summary

Visual Basic .NET supports inheritance. In addition to defining and implementing interfaces, Visual Basic .NET supports class inheritance. Because of the incorporation of class inheritance in Visual Basic .NET, you now have three kinds of polymorphism to choose from: interface polymorphism, inheritance polymorphism, and abstract polymorphism.

Use inheritance to support subclassing when you want to generalize an existing class, and use interface polymorphism when you need to support similar capabilities across disparate classes. Abstract classes allow you to combine constraining an interface with inheritance. When you are defining classes, keep an eye out for conditional behavior or select case statements. Type codes that are used to determine ...

Get Visual Basic® .NET 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.