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

Answers were Sorted based on User's Feedback



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

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

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

Answer / kiran

constructor are called in this order
a,b,c

Is This Answer Correct ?    7 Yes 2 No

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

Answer / priya

the constructor of class A is called first then Class B and
at the end class C.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

how can your software identify which version of dot net framework install in client pc and install framework accordingly

2 Answers   pspl,


Why data types are important?

0 Answers  


What is difference between an reference type and value type in C#?

0 Answers   B-Ways TecnoSoft,


What is the purpose of namespace?

0 Answers  


What is the namespcae generally given to the webpage of the .NET Framework ?

0 Answers   Siebel,






What is jit? What are the different types of jit?

0 Answers  


What is window application in c#?

0 Answers  


What is a singleton unity?

0 Answers  


Can you inherit multiple interfaces?

3 Answers  


Does c# support parameterized properties?

0 Answers  


What is ilasm.exe used for?

0 Answers  


Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?

0 Answers  


Categories