[Solved] Inheritance – Tricky OOP Concepts


This is actually easy to test

However

Static Constructors (C# Programming Guide)

A static constructor is used to initialize any static data, or to
perform a particular action that needs to be performed once only. It
is called automatically before the first instance is created or any
static members are referenced.

Static constructor is called when the class is accessed the first time. So the static constructor of B will be called first if you access the B, static constructor of A is not called until you use the A. If you use A first, then static constructor of A is called first and other way around.

The instance constructor will get called when the class is initialized

solved Inheritance – Tricky OOP Concepts