title: Can I use a collection initializer for Dictionary<TKey, TValue> entries?
body: <p>I want to use a collection initializer for the next bit of code:</p>
  
  <pre><code>public Dictionary&lt;int, string&gt; GetNames()
  {
      Dictionary&lt;int, string&gt; names = new Dictionary&lt;int, string&gt;();
      names.Add(1, "Adam");
      names.Add(2, "Bart");
      names.Add(3, "Charlie");
      return names;
  }
  </code></pre>
  
  <p>So typically it should be something like:</p>
  
  <pre><code>return new Dictionary&lt;int, string&gt;
  { 
     1, "Adam",
     2, "Bart"
     ...
  </code></pre>
  
  <p>But what is the correct syntax for this?</p>