Home > DeveloperSection > Blogs > Polymorphism in c#

Polymorphism in c#


C# C# 
Ratings:
0 Comment(s)
 2447  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

http://www.mindstick.com/Articles/61512673-be7d-4dcb-b214-bfb7cf632fe0/?Polymorphism

 

 


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

Follow MindStick