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
Is string passed by reference in c#?
What is session c#?
What is the CTS, and how does it relate to the CLS?
How do you create empty strings in c#?
how to print invert pyramid in c#
What is difference between comparable and comparator?
What is unsigned int?
What is action c#?
What types of object can I throw as exceptions?
How can you access a private method of a class?
What do you understand by the terms datareader object and dataset object?
What is Web.config?
What is the components of window?
What is polymorphism c# example?
What is an Interface in C#?