Home > DeveloperSection > Blogs > Polymorphism in c#

Polymorphism in c#

C# C# 
1 Comment(s)
 2864  View(s)
Rate this:

Polymorphism in c#

Polymorphism isimportant features of object-oriented programming (OOP’s) and we can define itas "Polymorphism means one namemultiple forms". Or we use same name for different methods by passingdifferent parameters by varying data types, then this process is called polymorphism.

Important points on polymorphism

• Poly means many and morph means form. Thus, polymorphismrefers to being able to use many forms of a type without regard to the details.

• Polymorphism is the characteristic of being able to assigna different meaning specifically, to allow an entity such as a variable, afunction, or an object to have more than one form

• Polymorphism is the ability to process objects differentlydepending on their data types

• Polymorphism is the ability to redefine methods forderived classes.

Types of Polymorphism

Compile time Polymorphism

Compile time Polymorphism also known as method overloading.Method overloading means having two or more methods with the same name but withdifferent signatures.

Run time Polymorphism

Run time Polymorphism also known as method overriding. Methodoverriding means having two or more methods with the same name, same signaturebut with different implementation

Check this link for more information





By Sunil Singh on   3 months ago

Your words increase my knowledge for sure. 

Keep sharing these types of articles.

Don't want to miss updates? Please click the below button!

Follow MindStick