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

Does c# support parameterized properties?

930


Can we inherit a class with private constructor in c#?

1034


Write a console application and implement the ternary operator to decide whether the age a user entered after being prompted is allowed to vote or not(given that only citizens between 18 and 120 years only inclusive can vote). Use exception handling for non-numerical input.

2322


What type of data type conversion happens when the compiler encounters the following code?

915


What is the difference between integer and double?

898


State the top.NET class that everything is derived from?

927


What is the difference between early binding and late binding in c#?

938


Explain the difference between event and a delegate in c#?

954


Why we use delegates in c#?

885


Is c# an open source?

913


What are native functions?

857


What is namespace in oops?

890


What floating point types is supported in C#?

1009


Why to use “using” in c#?

1049


explain the three services model commonly know as a three-tier application.

974