title: Class variables not initializing
body: <p>I have a really bizarre problem that seems like some sort of compiler error, but I also feel like that's really unlikely.</p>
  
  <p>I have two nested classes that both have class variables. One of them (<code>SpriteList</code>) works perfectly fine and initializes all of the variables perfectly. When I breakpoint it, the program does break when initializing that class.</p>
  
  <p>The other nested class (<code>ItemList</code>) is acting a little weird. The class variable in it isn't initializing and when I breakpoint the code, the program never breaks.</p>
  
  <p>This is my code:</p>
  
  <pre><code>class Registry
  {
      public static Dictionary&lt;string, StaticSprite&gt; spriteRegistry = new Dictionary&lt;string, StaticSprite&gt;();
      public static Dictionary&lt;string, Item&gt; itemRegistry = new Dictionary&lt;string, Item&gt;();
  
      public static void registerSprite(string name, StaticSprite sprite)
      {
          spriteRegistry.Add(name, sprite);
          Console.WriteLine("Registered Sprite: " + name + "!");
      }
  
      public static void registerItem(string name, Item item)
      {
          itemRegistry.Add(name, item);
          Console.WriteLine("Registered Item: " + name + "!");
      }
  
      public class ItemList
      {
          public static Item test = new ItemTest();
      }
  
      public class SpriteList
      {
          public static StaticSprite rock = new SpriteRock();
          public static StaticSprite pedestal = new SpritePedestal();
          public static StaticSprite item = new SpriteItem();
      }
  }
  </code></pre>
  
  <p>I really have no idea what is wrong here. Neither class is constructed anywhere, not that is should matter. When I move the variables in ItemList into SpriteList, it runs fine.</p>
  
  <p>I really have no clue as to what's wrong here.</p>