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 do I run managed code in a process?

974


What is private and shared assembly?

961


What is difference between string and stringbuffer in c#?

915


Can enum be null c#?

958


what is collections in .net? why we use?

2112


What are destructors in C#?

1487


From which base class do all Web Forms inherit from?

961


How does c# generics and c++ templates compare?

883


Describe two uses of the “using” statement during the operation of c#?

917


What is unmannaged code and will CLR handle this kind of code or not .

986


What is private class in c#?

894


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

926


What is data annotation in c#?

897


How does c# achieve polymorphism?

905


What are async and await?

918