C# Programming Language - What is Polymorphism?
OOPS - What is Polymorphism in C#?
In the previous article I explained about Abstract Class C# Tutorial for Beginners, here I will explain about polymorphism.
Polymorphism means one name many forms. Polymorphism means one object behaving as multiple forms. One function behaves in different forms. In other words, Many forms of a single object is called Polymorphism.
In polymorphism we will declare methods with same name and different parameters in same class or methods with same name and same parameters in different classes.
Polymorphism has ability to provide different implementation of methods that are implemented with same name.
There are two types of polymorphism:
- Static or compile time polymorphism
- Dynamic or runtime polymorphism