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


Please Help Members By Posting Answers For Below Questions

Explain different properties of object oriented systems.

443


What is the difference between Object and class adapters?

513


What are the steps for creating clr trigger

563


Why hashtable is thread safe in c#?

487


What is concrete class in c#?

470






Define a manifest in .net?

534


What is datetime parse in c#?

512


Write a syntax for writing a event delegate.

489


Which of these statements correctly declares a two-dimensional array in c#?

648


How do I open the console window?

567


What are the value types in c#?

502


When do we generally use destructors to release resources?

517


What does a constructor do c#?

490


So let's say I have an application that uses myapp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name myapp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new myapp.dll?

489


What are the three types of predicates?

452