What is RunTime Polymorphism?

Answer Posted / ansar hussain.m

Polymorphism means one object behaving as multiple forms.
simple one in many forms .
there are two types of poly morphism
1) compile time
2) runtime

1)compile time:
overloading a method , constructor , operator etc.. comes under compile time polymorphism because compiler checks the type and number of parameters passed on to the method and decides which method to call at the compile time itself and it will give an error if there are no method that matches the method signature of the method that is called at the compile time itself


2) runtime polymorphism:

overriding comes under runtime polymorphism because the compiler would not be aware of the method is available for overriding the functionality or not. so compiler would not give any error at compile time. At runtime it will be decided which method to call. and if there is no method at runtime it will give an error

Is This Answer Correct ?    26 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by Driver Script?

623


Explain me what is an anonymous method and how is it different from a lambda expression?

537


Explain clr, cts and cls?

628


Tell us what is heap and what is stack?

561


Explain the difference between .net 2000 and .net 2005(features)? Which one is better?

562






What should you do to store an object in a viewstate?

561


What is an anonymous method?

527


How do I spawn a thread?

564


What is an exe and a dll?

598


what is machine key error in .NET how can we solve it?

2101


Tell me what is a “jagged array”?

589


What relationship is between a process, application domain, and application?

546


Describe session handling in a webform, how does it work and what are the limitations?

568


Explain the difference between task and thread in .net?

515


What is Entity Relationship Model in .NET?

594