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

Explain the difference between asp.net & vb.net and explain architecture?

749


What are the types of jit?

796


What is machine.config in .net?

776


Explain me what is the .net framework and how does it work?

756


Explain how to produce an assembly?

756


Difference abstract class and interface in .net?

798


What are the security policy levels in .Net

1791


What is func in .net 3.5?

736


What is COM Interoperability in .NET

845


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

2309


Do I have any control over the garbage collection algorithm?

768


Compare & contrast rich client (smart clients or windows-based) & browser-based web application

727


What is the use of design pattern?

743


Please explain when should you use .net web forms over asp.net mvc?

746


What is delegation in .net?

808