title: How to initialize KeyValuePair object the proper way?
body: <p>I've seen in (amongst others) <a href="https://stackoverflow.com/questions/11694910/how-do-you-use-object-initializers-for-a-list-of-key-value-pairs">this question</a> that people wonder how to initialize an instance of <em>KeyValuePair</em>, which expectedly should look like this.</p>
  
  <pre><code>KeyValuePair&lt;int, int&gt; keyValuePair = new KeyValuePair&lt;int, int&gt;
  { 
    Key = 1,
    Value = 2
  };
  </code></pre>
  
  <p>It doesn't work, as if the properties aren't there. Intead, I need to use the constructor like this.</p>
  
  <pre><code>KeyValuePair&lt;int, int&gt; keyValuePair = new KeyValuePair&lt;int, int&gt;(1, 2);
  </code></pre>
  
  <p>Admittedly shorter syntax but it bothers me that I can't use the initializer. What am I doing wrong?</p>