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

A->B->C (EXTENDS)
How the constructors are called when we created an object of C

Answer Posted / ramkishore mateti

When you intantiate Class C then the Class C Constructor
calls its base class(class b) constructor, Class b calls
its baseclass constructor i.e Class a, Class a calls its
base class constructor System.object.System.object
intiallizes class fields, then it comes to Class a it
intializes thier class fields and it comes to Class b after
intilalizion at last the Class C constructor intializes
their class fields.
Hence the Hierarchy of class Constructors are called are
a , b, c

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does dll hell solve in .net?

958


How to find the current application file path while runtime?

985


Is it possible to nest cfml conditional tags?

894


Explain the concepts of cts and cls(common language specification).

966


What is the difference between internal and protected in c#?

1000


Why is c# good for games?

951


Can we use "this" command within a static method?

993


What is the default value of decimal in c#?

919


Can abstract classes be final?

934


Is void a class?

863


What is difference between ilist and list?

893


What is the difference between dynamic type variables and object type variables in c#?

876


Differentiate between static class and singleton instance?

1014


Is post back in c#?

956


Why is static constructor called first?

898