I have put breakpoint into "get"
static readonly LawClass s_Law = new LawClass();
public static LawClass Law { get { return s_Law; } }
and found out s_law is null.
How is it possible? I thought static variables are initialized before first class access and in line-by-line order.
s_Lawin the getter and set it to a new instance if it is null?readonly, so you couldn't set it if you tried. Beyond that; the point is that it should never be null because it's initialized to a value and can't be changed afterwards.