Linq OrderBy sort rule
<p>I want to know on which rule the OrderBy method of Linq decides on how to sort a list of chars. I thought that it compares the char to each other with the help of the values they have in the Ascii table, but I tried it by myself an it was not correct. So does somebody know on which rule the sort is done?</p>

<p><strong>EDIT:</strong></p>

<pre><code> string[] letters = { " ", "!", "+", "1", "9", "?", "A", "B", "Y", "Z", "[", "a", "b", "y", "z", "{"};
 IEnumerable&lt;string&gt; ascending = letters.OrderBy(x =&gt; x);
 // returns { " ", "!", "?", "[", "{", "+", "1", "9", "a", "A", "b", "B", "y", "Y", "z", "Z"}
</code></pre>

<p>I expexted to receive the same list back, but I got it with a complete new order.</p>

<p><strong>SOLUTION:</strong>
I used a string array instead of a char array, so the OrderBy sorted the strings which is different than when you use chars.</p>