title: How does OrderBy work with regard to strings in C#?
body: <p>Consider this code</p>
  
  <pre><code>var strings2 = new List&lt;string&gt;
      {
          "0", // Ascii code 48 (decimal)
          "|"  // Ascii code 125 (decimal)
      };
  var sorted = strings2.OrderBy(x =&gt; x).ToArray();
  </code></pre>
  
  <p>Sorted contains <code>"|", "0"</code>. Now consider this code (all I did was change <code>"|"</code> to <code>"."</code>)</p>
  
  <pre><code>var strings2 = new List&lt;string&gt;
      {
          "0", // Ascii code 48 (decimal)
          "."  // Ascii code 46 (decimal)
      };
  var sorted = strings2.OrderBy(x =&gt; x).ToArray();
  </code></pre>
  
  <p>Now sorted contains <code>".", "0"</code>
  In both cases the <code>"0"</code> comes at the end even though 125 > 48, what is going on here?</p>