title: Is there a better way to initialize a Hastable in .NET without using Add method?
body: <p>I am currently initializing a Hashtable in the following way:</p>
  
  <pre><code>Hashtable filter = new Hashtable();
  filter.Add("building", "A-51");
  filter.Add("apartment", "210");
  </code></pre>
  
  <p>I am looking for a nicer way to do this.</p>
  
  <p>I tried something like </p>
  
  <pre><code>Hashtable filter2 = new Hashtable() {
      {"building", "A-51"},
      {"apartment", "210"}
  };
  </code></pre>
  
  <p>However the above code does not compile.</p>