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
What is out int in c#?
Why do we use lambda expression in c#?
Can class be protected in c#?
How to handle exceptions that are raised in a component?
Explain anonymous type in c#?
what is IEquatable
What is the main purpose of delegates in c#?
What does break do in loop?
What does console readline do?
What are annotations in c#?
What does void mean in c#?
Can we create instance of private class in c#?
How to force my .net app to run as administrator on windows 7?
Which class comes after the SortedList class?
Can we declare private class in c#?