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


Please Help Members By Posting Answers For Below Questions

How will you get the different language strings?

940


Why do we need private constructor in c#?

892


What is the difference between properties and indexer in c#?

920


What is console read in c#?

903


What are immutable types in c#?

901


What is short in c#?

976


What is the difference between class and namespace?

978


Is xamarin free?

855


What is the difference between malloc () and new?

1058


how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.

1732


Are c# tuples immutable?

928


Why do you need boxing in c#?

920


What is the difference between const and static read-only?

941


What happens when thread sleep () method is called?

905


What is the difference between finally and finalize block?

940