title: Initialize variables outside the constructor
body: <p>I want to create a small static class in C#.</p>
  
  <p>This class only needs a list and a bool.</p>
  
  <p>What's the difference between initializing the list and setting the default value of my bool (false) outside of any methods, like that:</p>
  
  <pre><code>class MyClass
  {
      static bool A = true;
      static List&lt;int&gt; B = new List&lt;int&gt;();
  }
  </code></pre>
  
  <p>and initializing them inside a method, like that:</p>
  
  <pre><code>class MyClass
  {
      static bool A;
      static List&lt;int&gt; B;
  
      public static void Initialize()
      {
          A = true;
          B = new List&lt;int&gt;();
      }
  }
  </code></pre>