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 a decimal an integer?
What is selector c#?
How do I use the 'using' keyword with multiple objects?
Can var be null c#?
Explain the importance and use of each, version, culture and publickeytoken for an assembly.
What is an interface class in c#?
Explain the 3 types of properties in c# with an example?
What is difference between managed and unmanaged code?
Enlist all the components of an ado.net framework?
What is a destructor in c#?
What is the benefit of interface in c#?
What is c# used for?
Which is faster iqueryable or ienumerable?
What are value types and reference types?
Write a syntax for writing a event delegate.