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


Please Help Members By Posting Answers For Below Questions

Is python easier than c#?

900


How do I declare a pure virtual function in c#?

944


What is definition in c#?

843


What is strongly typed in c#?

885


If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.

975


Why do we need constructor?

884


What is the use of console readline () in c#?

824


Can we override constructor in c#?

891


What is Web.config?

996


What is difference between private and protected?

971


Why we use delegates in c#?

878


What is private virtual in C#?

987


What is the difference between abstract and abstraction?

815


Write the difference between TypeOf and GetType?

1007


What is binding in c#?

868