title: Sort a Dictionary<int, List<int>> by keys + values inside list
body: <p>Suppose we have a </p>
  
  <pre><code>var dictionary= new Dictionary&lt;int, IList&lt;int&gt;&gt;();
  </code></pre>
  
  <p>What I want is to ouput a sorted version of it, ordered first by keys and then by values inside a list.</p>
  
  <p><em><strong>E.g.</em></strong></p>
  
  <pre><code>1   2, 1, 6
  5   2, 1
  2   1, 3
  </code></pre>
  
  <p><em><strong>Becomes</em></strong></p>
  
  <pre><code>1    1, 2, 6
  2    1, 3
  5    1, 2
  </code></pre>
  
  <p>I tried doing it inside <code>foreach</code>, but obviously this is a bad idea to change the thing you are iterating.</p>