What is polymorphism? pl explain practically rather than
theoretical?
Answers were Sorted based on User's Feedback
Answer / mukesh
Polymorphism - Poly means "many" So it is one name and many forms. In C# we have two types of polymorphism compile time and run time. Compile time polymorphism is achieved through Function Overloading ( Same function but different parameters or signatures) and Run time polymorphism is achieved through function Overriding also called shadowing in VB.net where a child class method overrides the base class function.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / umesh shrivastava
In the word Polymorphism here poly means many and morphism
means form ie.one interface having multiple function.
Polymorphism are of two type
1 Static polymorphism:we can use this by implementing
function overloading and oprator overloading.
2 Dynamic Polymorphism:we can user this by implementing
virtual function and abstract classes.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / mayur teli
Polymorphism is the ability of different classes to provide different implementation of the same public interfaces.
For Example: a Driver object can interact with Car object through a Car public interface. If another object such as Truck object or SportCar object, expose the same interface, the Driver object can interact with them without regard to specific implementation of that interface.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the difference between directcast and ctype?
What do you mean by hashtable c#?
Does C# support multiple inheritance?
Explain the difference between a struct and a class?
What is a ienumerator?
Why is it a bad idea to throw your own exceptions?
What is default boolean value in c#?
Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?
Where do you add an event handler ?
What is difference between event and delegate in c#?
Define multicast delegate in c#?
What is early binding and late binding
12 Answers ABC, Infosys, TATA,
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)