If a type has no static constructor, field Initializers will execute before the type being used (as I understand : not being instantiated but rather being used)
Not necessarily.
If there is no static constructor, then static field initializers will be executed at some time before a static field is first used - but the static field initializers don't have to execute before any instances are created.
From the C# 5 specification section 10.5.5.1:
The static field variable initializers of a class correspond to a sequence of assignments that are executed in the textual order in which they appear in the class declaration. If a static constructor (§10.12) exists in the class, execution of the static field initializers occurs immediately prior to executing that static constructor. Otherwise, the static field initializers are executed at an implementation-dependent time prior to the first use of a static field of that class.
But in your case, you're just seeing that when the constructor of Foo
is called in order to initialize Instance
, X
is still 0, because it hasn't been assigned a value. The field initializers are executed in textual order, so Instance
is assigned a value before X
. It's as simple as that - it's not a matter of timing between static fields and instance fields, as you haven't got any instance fields.
EDIT: It seems that you're being getting confused by the constructor call. Foo
is already being initialized - the constructor call doesn't change that, and there's no "second initialization". The constructor is called normally, prints "0" and then returns. Then X
is assigned a value of 3.