title: C#, Unity, need help making a dictionary of <int, class>
body: <p>I tried to look a bit about dictionaries and it should work,</p>
  
  <p>any idea why it doesn't?</p>
  
  <p>first I make a class with private properties:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class level
  {
      private string levelTitle;
      private int moneyValue;
  
      public string LevelTitle
      {
          get
          {
              return levelTitle;
          }
  
          set
          {
              levelTitle = value;
          }
      }
  
      public int MoneyValue
      {
          get
          {
              return moneyValue;
          }
  
          set
          {
              moneyValue = value;
          }
      }
  
      public level(string levelTitle, int moneyValue)
      {
          this.LevelTitle = levelTitle;
          this.moneyValue = moneyValue;
      }
  }
  </code></pre>
  
  <p>btw, in the class constructor, should I assign the private properties themself or through their get set methods?</p>
  
  <p>anyway, then on another script, I make a dictionary:</p>
  
  <pre><code>public Dictionary&lt;int, level&gt; levels = new Dictionary&lt;int, level&gt;()
  {
      {0, new level{"Green Field Forever", 1}},
      {1, new level{"Golden Vally", 2}}
  };
  </code></pre>
  
  <p>which gives me a bunch of error including :</p>
  
  <p>the level type argument doesn't take 0 arguments</p>