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 virtual 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
}



Trace the O/p for a program on inheritance and Polymorphism. 3 classes A,B,C A with two method..

Answer / payal

call B's SomeMethodA
Call A's SomeMoreMethodA
call C's SomeMethodA
call C's SomeMoreMethodA

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How do you implement multiple inheritance in .NET?

5 Answers   Infosys, Microsoft,


What is the difference between dictionary and hashtable in c#?

0 Answers  


What is jit (just in time)?

0 Answers  


What are the 2 broad classifications of fields in c#?

0 Answers  


What is data type c#?

0 Answers  


what is a destructor?

0 Answers   Amazon,


how to print invert pyramid in c#

0 Answers   ForSight,


What is exe file in c#?

0 Answers  


hi , how could i analyse a text the user added on a site to look for some words like "car" "shouffere" .. and then i can use that information in addition to other information to make a decision about the adds im going to to show on the site.

1 Answers  


What is a reference type c#?

0 Answers  


How do you escape in c#?

0 Answers  


What are delegate methods?

0 Answers  


Categories