<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>

In C# 3 it should compile fine like this:
```
```
Hashtable table = new Hashtable {{1, 1}, {2, 2}};
```
```