title: What's the function of a static constructor in a non static class?
body: <p>I've noticed that a non-static class can have a static constructor:</p>
  <pre><code>public class Thing
  {
      public Thing()
      {
          Console.WriteLine(&quot;non-static&quot;);
      }
  
      static Thing()
      {
          Console.WriteLine(&quot;static&quot;);
      }
  }
  </code></pre>
  <p>And when you initialize an instance of <code>Thing</code> the static constructor gets called first.</p>
  <p>Output:</p>
  <blockquote>
  <p>static</p>
  <p>non-static</p>
  </blockquote>
  <p>What would be the need for this? Do you use it to initialize static fields on your instance of the non-static type?</p>
  <p>Are there any things to take into consideration when using a static constructor?</p>