title: LINQ query to return a Dictionary<string, string>
body: <p>I have a collection of MyClass that I'd like to query using LINQ to get distinct values, and get back a Dictionary&lt;string, string> as the result, but I can't figure out how I can do it any simpler than I'm doing below.  What would some cleaner code be that I can use to get the Dictionary&lt;string, string> as my result?</p>
  
  <pre><code>var desiredResults = new Dictionary&lt;string, string&gt;(StringComparer.OrdinalIgnoreCase);
  
  var queryResults = (from MyClass mc in myClassCollection
                      orderby bp.SomePropToSortOn
                      select new KeyValuePair&lt;string, string&gt;(mc.KeyProp, mc.ValueProp)).Distinct();
  
  foreach (var item in queryResults)
  {
      desiredResults.Add(item.Key.ToString(), item.Value.ToString());
  }
  </code></pre>