title: LINQ ToDictionary initial capacity
body: <p>I regularly use the LINQ extension method ToDictionary, but am wondering about the performance. There is no parameter to define the capacity for the dictionary and with a list of 100k items or more, this could become an issue:</p>
  
  <pre><code>IList&lt;int&gt; list = new List&lt;int&gt; { 1, 2, ... , 1000000 };
  IDictionary&lt;int, string&gt; dictionary = list.ToDictionary&lt;int, string&gt;(x =&gt; x, x =&gt; x.ToString("D7"));
  </code></pre>
  
  <p>Does the implementation actually take the list.Count and passes it to the constructor for the dictionary?
  Or is the resizing of the dictionary fast enough, so I don't really have to worry about it?</p>