title: Why in C# does order matter for static initialization?
body: <p>This code has the well defined behavior in C# of not working:</p>
  
  <pre><code>class Foo
  {
      static List&lt;int&gt; to = new List&lt;int&gt;( from ); // from is still null
      static IEnumerable&lt;int&gt; from = Something();
  }
  </code></pre>
  
  <p><em>Note: I'm not asking how to fix that code as <a href="https://stackoverflow.com/questions/185384/order-of-static-constructors-initializers-in-c">I already known how to do that</a></em></p>
  
  <p>What is the justification for this? C# already does run time checks to detect the first access to static members. Why not extend this to a per member thing and have them run on demand or even better have the compiler figure out the order at compile time?</p>
  
  <p>BTW: I think the same question (or almost the same) also holds for non static members.</p>