Visual Basic Concepts

Polymorphism

See Also

Polymorphism means that many classes can provide the same property or method, and a caller doesn't have to know what class an object belongs to before calling the property or method.

For example, a Flea class and a Tyrannosaur class might each have a Bite method. Polymorphism means that you can invoke Bite without knowing whether an object is a Flea or a Tyrannosaur — although you'll certainly know afterward.

The following topics describe Visual Basic's approach to polymorphism and how you can use it in your programs.

For More Information   With the Professional and Enterprise editions of Visual Basic, Polymorphism becomes a powerful mechanism for evolving systems of software components. This is discussed in "General Principles of Component Design" in Creating ActiveX Components in the Component Tools Guide.