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 are constants in c#?
Can a constructor have a return type?
Explain About stateless and state full web service
Describe an interface class?
What is anonymous method in c#?
How long does it take to get a loop recorder put in?
What is a string c#?
What is deferred execution?
Explain about generics in c#.net?
What is difference between an Structure and Class?
Can we change static value in c#?
What is cache memory in c#?
Does c# support try-catch-finally blocks?
How does split work in c#?
What is the difference between finally and finalize block?