Skip to Content
0
Aug 29, 2010 at 03:23 PM

Static constructor

501 Views

Hi,

I have a class A and a class constructor in the class A and another class B which inherits class A.

There is a class C. Class C is independent and has a class constructor too. It does not inherit any class.

After start of selction event, i have created 3 data objects type ref to A, B and C.

After that i have created all of the objects using the statement "create object".

when i debugged the program the static constructor of the class A was called

even before type ref to statement. But the static constructors of the class C was

called only when the statement create object C was executed.

Even i commented the statement "Data : aa type ref to A & create object aa", still the class constructor

of class A was getting called!!!!! Can some one explain the above?

Regards,

Lakshminarasimhan.N