Trace the O/p for a program on inheritance and
Polymorphism. 3 classes A,B,C
A with two methods
public virtual SomeMethodA
public virtual SomemoreMethodA
B:A
overide SomeMethodA
C:B new Method SomeMethodA
override SomeMoreMethodA
main method
{
b new instance of B
b.SomeMethodA
b.SomeMoreMethodA
b1 new instance of C
b1.SomeMethodA
b1.SomeMoreMethodA
}
Answer Posted / vibz
Call to B's SomeMethodA
Call to A's SomeMoreMethodA
Call to B's SomeMethodA
Call to C's SomeMoreMethodA
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Is it good to use var in c#?
What is an ienumerable in c#?
What is object pool in .net?
What is dao in c#?
What is cosole application?
What is the use of private constructor in c#?
What is deferred execution in c#?
How do you create partial methods?
What is transparent caching with aop ?
Name the control which cannot be placed in mdi?
What is difference between var dynamic and object in c#?
What's your approach to fetch static data in your windows form application?
What is iqueryable in linq?
What is the purpose of a console table?
What is string empty?