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 delegate in c#?
What do you understand by 'access specifiers' in C#?
What does out mean in c#?
What is a delegate in c#?
What are strings in c#?
What are the properties in c#?
What is datetime parse in c#?
What is an assembly in .net?
How to generate strong name key file or which command is used to generated strong name key file?
Why should you override the tostring() method?
In gridview in editmode if we want to display information in one combobox based on
Is c# substring zero based?
Write a program in c# to find the angle between the hours and minutes in a clock?
What's the difference between the debug class and trace class? Documentation looks the same.
How can you prevent escaping on backslashes in C# with string definitions?