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 array a collection c#?
What is object type in c#?
What are the properties of a string class?
What is the difference between an XML "Fragment" and an XML "Document." ?
What is difference between class and interface in c#?
What is difference between for and foreach loop in c#?
Is goto statement supported in c#?
What are the access allowed for compilation units(namespace),class and structs and what are its default access?
can you create a function in c# which can accept varying number of arguments
difference between managed code and unmanaged code ?
What is type safe code?
What is the use of ispostback in c#?
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)