its_yogesh
What is Polymorphism? How does VB.NET/C# achieve polymorphism?
Posted by its_yogesh in OOP | Others on Aug 05, 2006
1
Do you know the answer for this question? Post it below.
Guest

The definition of polymorphism is when different types of objects use the method or properties with the same name. Therefore, the programmer doesn't need to know the exact type of an object while coding the application. The precise behavior of a method or property is determined at run-time.

Posted by manoj prabakaran on Apr 20, 2012

The single sentence definition of polymorphism is"The ability to take more than one form.".

__________________________________________________________
MBA consultants in India

Posted by johnpaulmathew on Jul 19, 2011

This is a nice and simple OOP interview question. As the name says POLY (Many) MORPHISM (Change). Polymorphism is the ability of the object to behave differently under different conditions. For instance a simple user object can behave as a admin user or as a simple user depending on conditions.

There are two ways of doing polymorphism dynamic and static. Static polymoprhism is achieved by using method overloading and dynamic polymorphism is acheived by using method overloading. Please note do confuse with overloading and overriding while answering this question. Many .NET developers make a niceversa statement leading to lot of confusion.

See my 50 .NET  and ASP.NET Interview questions

Posted by Shivprasad on Feb 06, 2011

Polymorphism: It's derived from a Greek word, where poly means many morph means Faces/Behaviors.

Same function/operator will show different behaviours when passed different types of values or different number of values.
Types of polymorphism:There are 2 types:-
1. Static polymorphism/Early Binding/Compile time polymorphism.
2. Dynamic polymorphism/Late Binding/Run time polymorphism.

Static polymorphism is achieved using i) Function overloading ii) Operator overloading

Dynamic polymorphism is achieved using i) Function overloading

Posted by AmaranathaReddy Ambati on Nov 28, 2010

polymorphism is popularly called as one interface,multiple functions.

The OOP allows object to respond differently for the same message.
It is an entity tat exists in different form simultaneously.

Static polymorphism
->function overloading
->operator overloading
->constructor overloading
    1>instance constructor
    2>static constructor

dynamic polymorphism
  1)abstract class
  2)virtual function
  3)delegates


->

Posted by vaishnavi ranganathan on Oct 10, 2010
Sponsored by
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
Sponsored by
Nevron Gauge for SharePoint
Become a Sponsor
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | REPORT ABUSE © 2011 C# Corner. All contents are copyright of their authors.