C#
What is Polymorphism
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nitin Gaur181 reputationPosted Apr 10, 2015, 11:27 PM EDT
it is a way to use a single thing in many forms by saying things i mean to say like variable, objects funtions and all..
01
MahaRank #2,573 · 543 reputationPosted Apr 11, 2015, 5:31 AM EDT
For example if you take OPEN word that takes many form; OPEN a bank account, OPEN a door or OPEN a bottle. Same word but different action that is polymorphism.
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 11, 2015, 12:11 AM EDT
http://www.c-sharpcorner.com/UploadFile/5d065a/polymorphism-in-C-Sharp/
Laxman Prajapati3 reputationPosted Apr 11, 2015, 12:22 AM EDT
Akhil GargRank #772 · 3K reputationPosted Apr 11, 2015, 1:15 AM EDT
https://msdn.microsoft.com/en-us/library/ms173152.aspx
Anupam SinghRank #643 · 3.7K reputationPosted Apr 12, 2015, 12:11 AM EDT
However apart from method overloading , In object oriented programming we uses interface known as polymorphic interface to achieve the same with other types(classes).
Riddhi ValechaRank #794 · 2.9K reputationPosted Apr 12, 2015, 2:50 AM EDT
Is there anything like operator overloading in c# ?? Or this was only in C++ ??
Anupam SinghRank #643 · 3.7K reputationPosted Apr 12, 2015, 3:00 AM EDT
Riddhi ValechaRank #794 · 2.9K reputationPosted Apr 12, 2015, 3:28 AM EDT
So.. We can do multiple inheritance in c# using interfaces ?? Is this the only way ??
Can you please give an example of multiple inheritance ??
MahaRank #2,573 · 543 reputationPosted Apr 12, 2015, 4:03 AM EDT
One parent class can have many child classes inherited from its parent class. But C# will not allow a child class to inherit from many parent classes. Because one child can't have many parents, this is a real world scenario. C# is well attuned to real world scenario!
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 12, 2015, 8:23 PM EDT
Hi,
Please refer my article
http://www.c-sharpcorner.com/UploadFile/ff2f08/understanding-polymorphism-in-C-Sharp/
Syed ShanuRank #87 · 23.7K reputationPosted Apr 12, 2015, 8:43 PM EDT