The code you have typed works fine - further to Mads Togersen's post about the implementation of collection initialisers, the compiler maps the brace-delimited entries ({"key1", "value1"}
above) to an Add method on the collection with the same signature - in this case Dictionary.Add(TKey, TValue).