JScript .NET, Part V: Polymorphism: A Final Word - Doc JavaScript | WebReference

JScript .NET, Part V: Polymorphism: A Final Word - Doc JavaScript

JScript .NET, Part V: Polymorphism

A Final Word

In this column, we drew your attention to polymorphism. It is considered one of the foundations of object oriented programming languages. We described the concept in this column, and how it is implemented in JScript .NET. We explained the role of the Object class, being the base class for all classes. We showed you how to call base methods with derived objects, proving that a derived class can always refer to a more basic class. The opposite, however is not true. You will get an error when trying to call a derived method with a base object. We also showed you how to use the system's polymorphic methods, how to write a polymorphic utility function, and how to implement a polymorphic interface.

In this column you have learned:

Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: June 3, 2002
Revised: June 3, 2002

URL: http://www.webreference.com/js/column111/8.html