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 IEquatable
If you donot specify an access modifier for a method, what is the default access modifier?
What is the implicit name of the parameter that gets passed into the class set method?
How to handle exceptions that are raised in a component?
What is using in c#?
Can we write class inside a class in c#?
What framework is used for performance testing/load testing?
Are c# references the same as c++ references?
Can we store different data types in arraylist in c#?
How to force my .net app to run as administrator on windows 7?
Define multicast delegate in c#?
Is xml tags are case sensitive?
Write one code example for compile time binding and one for run time binding? What is early/late binding?
What does it mean to override a method?
What are mutable and immutable types in c#?