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
How does dll hell solve in .net?
How to find the current application file path while runtime?
Is it possible to nest cfml conditional tags?
Explain the concepts of cts and cls(common language specification).
What is the difference between internal and protected in c#?
Why is c# good for games?
Can we use "this" command within a static method?
What is the default value of decimal in c#?
Can abstract classes be final?
Is void a class?
What is difference between ilist and list?
What is the difference between dynamic type variables and object type variables in c#?
Differentiate between static class and singleton instance?
Is post back in c#?
Why is static constructor called first?