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 / kanan
Vibz answer is correct at some level. but i am thinking
different way.
Call to class B's SomeMethodA
Call to class A's SomeMoreMethodA
Call to class C's SomeMethodA <-- our answers differ here
Call to class C's SomeMoreMethodA
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Why do we need oops in c#?
what is the purpose of using statement in c#
Why do we use hashtable in c#?
What is the difference between IEnumerator and IEnumerable?
What is the difference between malloc () and new?
Is null or empty in c#?
What is string pool in c#?
Is post back in c#?
What is concrete method in c#?
What is the use of ienumerable in c#?
What is the implicit name of the parameter that gets passed into the set method/property of a class?
What are the different types of assembly?
Explain About .Net remoting
What is the use of iqueryable in c#?
What is private constructor c#?