title: When was this type of dictionary initialization code added to C#?
body: <p>I just discovered that C# allows dictionary initialization like the code below.  The <a href="http://msdn.microsoft.com/en-us/library/bb531208.aspx" rel="nofollow">MSDN documentation</a> talks about this further.  I think this is pretty cool, and I'm wondering how long I've been initializing dictionaries the old-fashioned way (a bunch of calls to Add).</p>
  
  <p>When was this type of dictionary initialization added to C#?  I compiled my test program in .Net 4.5, 4.0, 3.5, and 3.0.  I got some weird error when I tried to compile my code with .Net 2.0 but it wasn't related to this dictionary initialization code.</p>
  
  <p>I've been coding C# for years and I've never seen this before today.  I only recently started using .Net 4.5.</p>
  
  <pre><code>public class MyClass
  {
      private Dictionary&lt;int, string&gt; _dc;
  
      public MyClass()
      {
          this._dc = new Dictionary&lt;int, string&gt;
          {
              {1, "one"},
              {2, "two"},
              {3, "three"}
          };
      }
  }
  </code></pre>