A->B->C (EXTENDS)
How the constructors are called when we created an object of C

Answers were Sorted based on User's Feedback



A->B->C (EXTENDS) How the constructors are called when we created an object of C..

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

A->B->C (EXTENDS) How the constructors are called when we created an object of C..

Answer / kiran

constructor are called in this order
a,b,c

Is This Answer Correct ?    7 Yes 2 No

A->B->C (EXTENDS) How the constructors are called when we created an object of C..

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

Post New Answer

More C Sharp Interview Questions

To allow an element to be accessed using a unique key which .NET collection class is used ?

0 Answers   Siebel,


Explain the difference between directcast and ctype.

0 Answers  


How encapsulation and abstraction defined/used in C#.NET.

8 Answers   Synechron,


What is the difference between var and dynamic types in c# 4.0?

0 Answers  


Explain states of a thread in c#?

0 Answers  






Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana

0 Answers  


What is out in c#?

0 Answers  


What is lastindexof c#?

0 Answers  


7. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?

2 Answers  


Is c# an open source language?

0 Answers  


How to put assembly in gac?

0 Answers  


Hai, I want to open a new form while the previous form is hiding or closing. I tried this with using MDI.I created one form like ParentForm.placed one button control.when clicked one that it opend new form like ChildForm.When i set the property of ChildForm to Maximize,but the ParentForm button control also appearing on the childform. so plz help me how to hide parentform controls(hide parentform while it is childform opened) thanq..

1 Answers  


Categories