December 2001
Intermediate to advanced
360 pages
9h 6m
English
Polymorphism is the ability to change the implementation of a base class for different objects. For example, if you have a bicycle and a car, both can move, but they do so in very different ways. They use different mechanisms for movement, and the distance that each can move in an hour is significantly different. Yet, both a Car and a Bike class might inherit from a base Transportation class, which could also be used as the basis for a Plane class, a Train class, a HotAirBalloon class, and so on.
Polymorphism was possible in VB6 using interfaces, which will be examined in a moment. VB .NET allows you to perform polymorphism using inheritance. The difference from what you have done so far is that you ...