Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What is shared inheritance

3 Answers   IGT,


What is default method in c#?

0 Answers  


Can a dictionary have the same key?

0 Answers  


Are structs faster than classes?

0 Answers  


Can bool be null c#?

0 Answers  


Is clr a compiler?

0 Answers  


How can we Achieve Late binding in C#.Can any give one example.

5 Answers   Value Labs,


What's your approach to fetch static data in your windows form application?

0 Answers   MCN Solutions,


What is the difference between interface and abstract class ?

2 Answers   Basware, BITS,


List the 5 different access modifiers in c#?

0 Answers  


What is strong name in c# and how can we use it?

0 Answers   DELL,


What are the advantages of using delegates in c#?

0 Answers  


Categories