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 class method?
How do you mark a method obsolete?
How can we make a thread sleep for infinite period ?
What are the Types of configuration files and their differences
What is the difference between an application domain and a process?
Can you have more than one namespace in c#?
Can we inherit two classes in c#?
What are most desktop applications written in?
Why is lazy loading?
Explain circular reference in c#?
What is the difference between int and int in c#?
What is data dictionary in c#?
If you define a user defined data type by using the struct keyword, is it a value type or reference type?
How much time will it take to learn unity?
What is the difference between firstordefault and first?