0

when is it called in an inheritance hierarcy. is the base static constructor called before the derived static constructor?

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Momerath
0

The constructors are called in the order needed. If the derived class constructor doesn't make use of anything in the base class, it is called first, then the base class. But if you use something from the base class, before it is used the base constructor is called, then the derived one.

Edited by Momerath: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.