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
Does c# support parameterized properties?
Can we inherit a class with private constructor in c#?
Write a console application and implement the ternary operator to decide whether the age a user entered after being prompted is allowed to vote or not(given that only citizens between 18 and 120 years only inclusive can vote). Use exception handling for non-numerical input.
What type of data type conversion happens when the compiler encounters the following code?
What is the difference between integer and double?
State the top.NET class that everything is derived from?
What is the difference between early binding and late binding in c#?
Explain the difference between event and a delegate in c#?
Why we use delegates in c#?
Is c# an open source?
What are native functions?
What is namespace in oops?
What floating point types is supported in C#?
Why to use “using” in c#?
explain the three services model commonly know as a three-tier application.