O'Reilly logo

Visual Basic .NET Programming Language, The by Paul Vick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Interfaces

In the previous chapter, we discussed inheritance as a way of abstracting common attributes of types into base types. Inheritance is a good way of expressing the essential nature of a type; for example, an Employee is a Person and a Manager is an Employee. But because types can only have a single base class, inheritance cannot be used to express general capabilities of types. For example, many types are “comparable,” which is the property of having values that can be “less than” or “greater than” other values. (For example, both numbers and dates are comparable types.) Comparable types have many useful attributes, not the least of which is that they can be sorted into an order.

However, inheritance is usually not sufficient ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required