1.What is the major advantage of polymorphism? Please don't
simply say binding. Specify any other reason.
Answer Posted / ashutosh
the main reason to use polymorphism is generalization, as
you can see in case of overloading. say if i have add
function which just add two intergers. and i have one more
similar kind of functionality then in that case i will do
the overloading as only my internal implemantation will
vary.
second thing is consistency in code.
and in case of overriding main advantage is you can invoke
child class function dynamically(means by creating the
object of base class as normally we do).
suppose one of my function expects my base class type
object and i want functionality of overrided function then
in that case i can simply write (parent obj = new child();)
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Explain what is heap and what is stack?
What is WSDL? Explain its architecture?
What are the properties of ADO.NET?
How to create properties and methods using controls?
Explain something about WebService?
What is the procedure to add assemly to gac to make it shared one?
How com+ related to the dna architecture?
What is a serviced component?
What is the need of OLE-automation?
What is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?
Explain what is a manifest in .net?
Explain the main components in .net?
How to implement CAS in .Net?
What is reflection in microsoft .net context?
Explain what is the difference between web application and enterprise application?