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

What is a di class?

533


What is view state c#?

519


What is the difference between array and arraylist c#?

468


What is default method in c#?

501


Why are strings immutable c#?

471






What is singleordefault?

515


What do you mean by directing?

493


Can abstract class have constructor?

502


What is difference between yielding and sleeping?

452


What is the difference between arraylist and list in c#?

460


What is anonymous types in c#?

504


HOW to Develope the CRUD(create,read,update,delete) FORM IN WINDOWS form by using c# only

528


How does split work in c#?

490


Explain hash table in c# ?

662


What is decimal in c#?

505