Inheritance Basics

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Chapter 10.  Inheritance and Polymorphism

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.) Even if your understanding of inheritance is expert, you are encouraged to read the remainder of this section simply to see the grammar used to support class inheritance in Visual Basic .NET.


Team-Fly    
Top
 


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 222

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net