title: String Comparison And Alphabetic Order of Individual Characters
body: <p>I have a question related to string comparison vs. character comparison.</p>
  
  <p>Characters <code>&gt;</code> and <code>0</code> (zero) have following decimal values <code>62</code> and <code>48</code> accordingly.</p>
  
  <p>When I compare two characters in the following code, I get value <code>True</code> (which is correct)</p>
  
  <pre><code>Console.WriteLine('&gt;' &gt; '0');
  </code></pre>
  
  <p>When I compare two one-character strings in the following code, I get value <code>-1</code> which indicates that <em>">" is less than "0"</em> (default culture is English)</p>
  
  <pre><code>Console.WriteLine(string.Compare("&gt;", "0"));
  </code></pre>
  
  <p>Whereas comparison of "3" and "1" (<code>51</code> and <code>49</code> code values) in the following code returns <code>1</code> (as expected)</p>
  
  <pre><code>Console.WriteLine(string.Compare("3", "1"));
  </code></pre>
  
  <p>Also, <code>string.Compare(string str1, string str2)</code> documentation says:</p>
  
  <blockquote>
    <p>The comparison uses the current culture to obtain culture-specific
    information such as casing rules and the alphabetic order of
    individual characters</p>
  </blockquote>
  
  <p>Would you be able to explain (or provide reference to some documentation) how string comparison is implemented e.g. how <em>alphabetic order of individual characters</em> is calculated etc?</p>