Sort keys and values in dictionary using LINQ
<p>I just wrote some code adding data into this Dictionary:</p>

<pre><code>    Dictionary&lt;string, Dictionary&lt;string, double&gt;&gt; studentsExamsMarks = 
        new Dictionary&lt;string, Dictionary&lt;string, double&gt;&gt;();
        studentsExamsMarks.Add("Peter", new Dictionary&lt;string, double&gt;());
        studentsExamsMarks["Peter"].Add("History", 5.15);
        studentsExamsMarks["Peter"].Add("Biology", 4.20);
        studentsExamsMarks["Peter"].Add("Physics", 4.65);
        studentsExamsMarks.Add("John", new Dictionary&lt;string, double&gt;());
        studentsExamsMarks["John"].Add("History", 6.00);
        studentsExamsMarks["John"].Add("Biology", 3.75);
        studentsExamsMarks["John"].Add("Physics", 4.15);
        studentsExamsMarks.Add("Michael", new Dictionary&lt;string, double&gt;());
        studentsExamsMarks["Michael"].Add("History", 3.00);
        studentsExamsMarks["Michael"].Add("Biology", 3.95);
        studentsExamsMarks["Michael"].Add("Physics", 4.95);
</code></pre>

<p>How should I sort and print first by the name of the student (ascending order)and than by the value of the doubles in the inner dictionary or by the name of the subject? I`ll be very thankful if you show me both Versions. Thank you!</p>