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
What is the advantage of generics in c#?
How will you get the different language strings?
What is orm in c#?
What is a dbml?
What is difference between array and collection in c#?
Explain what a diffgram, and a good use for one Define diffgram? How it be used?
What is the use of convert toint32 in c#?
What is ildasm and obfuscator in net?
What is dbml file in c#?
What is the difference between paramaterized constructor and copy constructor?
Explain states of a thread in c#?
Can derived classes have greater accessibility than their base types?
Why do we use abstract class in c#?
How long does a loop recorder procedure take?
What is #region in c#?