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 are dynamic link library used over static one?
How does dictionary work in c#?
Can constructor have return type c#?
What are PE(Portable Executable)?
What do you mean by generic class in c#?
What are the three types of operators?
What is the difference between an integer and int?
What are constants in c#?
write a program to find the biggest palindrome in the given string
What do you mean by winforms in c#?
What is Satellite Assemblies ?
What is IL / CIL / MSIL?
Can you use all access modifiers for all types?
What is a dynamic assembly?
What is c# used for in the industry?