Inheritance Basics

Interfaces contain declarations only. Classes can contain both declarations and definitions. Classes can implement interfaces as well as inherit from a single parent class. Interfaces use the keyword Interface, and classes use the keyword Class in Visual Basic .NET.

The difference between an interface and a class is that classes provide implementations for their members and interfaces define members without implementations. Both classes and interfaces support inheritance. A class may inherit from a single parent and implement zero or more interfaces, and interfaces support multiple interface inheritance but provide no implementation. (We will return to interfaces later in this chapter. For now let's focus on what classes offer.) ...

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.