title: ToList().Sort() in Linq query gives compilation error
body: <p>I am trying to combine two <code>SortedDictionaries</code>, change the result to a <code>List&lt;KeyvaluePair&lt;string,string&gt;&gt;</code> and <code>Sort()</code> the result. The following statement throws an error:</p>
  
  <pre><code>var combinedEntries = from p in leftDict.Union(rightDict).ToList().Sort(myComparer) select p;
  </code></pre>
  
  <p>Error: Could not find an implementation of the query pattern for source type 'void'.  'Select' not found.</p>
  
  <p>This is not working because Sort() returns void. If I split up the statement, it works:</p>
  
  <pre><code>var combinedEntries = from p in leftDict.Union(rightDict) select p;
  List&lt;KeyValuePair&lt;string, string&gt;&gt; finalentries = combinedEntries.ToList();
  finalentries.Sort(comparer);
  </code></pre>
  
  <p>I understand that sort is a method of List type and not <code>IEnumerable</code>, but I thought calling <code>ToList()</code> before <code>Sort()</code> will take care of that problem. So first question is can it be used like I am trying in the first statement? If not, how do I make use of <code>orderby</code> here?         </p>