A->B->C (EXTENDS)
How the constructors are called when we created an object of C
Answers were Sorted based on User's Feedback
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 |
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 |
Is hashset ordered c#?
You are designing a user control. You created new property called backgroundimage which is of type image. You wanted to disable storing this property in the user’s form. How to achieve this?
What is selector c#?
In all methods of an interface should be derived?
This is Kishore i am MCA graduate i have percentage less(52%) in my 10th still i completed .NET course any body tell me how to put fake experience with my BSC degree if you do not mind tell me some fake certificates giving consultencies names in Chennai,Bangalore
What is data quality assurance?
What is the compiler of c#?
Can we inherit a class with private constructor in c#?
How to implement singleton design pattern in c#?
What you mean by inner exception in c#?
What are instance fields in c#?
Can you use all access modifiers for all types?