Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Any Java object that can pass more than one IS-A test is considered to be polymorphic.
Can we use polymorphism in C language?
Almost all implementations of runtime polymorphism in C will use function pointers, so this is the basic building block.
Where do we use polymorphism in C#?
- It allows you to invoke methods of derived class through base class reference during runtime.
- It has the ability for classes to provide different implementations of methods that are called through the same name.