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 |
What is poco c#?
What is the purpose of static?
What is the difference between directcast and ctype?
What are the access-specifiers available in c#?
How does inheritance work in c#?
What is tryparse?
Explain the security with aop?
Explain About sn.exe
What is task parallel library?
Can you override private virtual methods?
11 Answers AROBS Transilvania Software, IBM, Mind Tree, Revalsys,
What is difference between value and reference types?
What is difference between an Structure and Class?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)