In OPP'S, polymorphism(Greek meaning "having multiple forms") is the ablity of being able to assign a different meaning or usage to something in different contexts - specifically, to allow an entity such as a a function, or an object to have more than one forms.
In C# : Parent classes may define and implement "virtual" methods(Which is done using the "virtual" keyword), and derived classes can override them(using the "override" keyword), which means they provide their own definition and implementation.At run-time, when user's code calls the method, the CLR looks up the run-time type of the object, and invokes that override of the virtual method. Thus in your source code when a method of the base class is called it executes the overriden method.
================================================================================ Regards Hefin Dsouza.
|
| Author: mahendrakiran 31 Oct 2008 | Member Level: Gold Points : 1 |
In object-oriented programming, the ability of different objects to respond, each in its own way, to the same message
|