Runtime polymorphism in C# | OOP in C# Part-22


What is Polymorphisms?

Polymorphisms is a generic term that means "many shapes". More precisely Polymorphisms
means the ability to request that the same operations be performed by a wide range of different
types of things.
At times, I used to think that understanding Object Oriented Programming concepts have made it
difficult since they have grouped under four main concepts, while each concept is closely related
with one another. Hence one has to be extremely careful to correctly understand each concept
separately, while understanding the way each related with other concepts.
In OOP the polymorphisms is achieved by using many different techniques named method
overloading, operator overloading and method overriding.

Runtime Polymorphism in C#

Runtime polymorphism or Dynamic Method Dispatch is a process in which a call to an overridden method is resolved at runtime rather than compile-time.

In this process, an overridden method is called through the reference variable of a base class. The determination of the method to be called is based on the object being referred to by the reference variable.

Post a Comment

Previous Post Next Post