title: Alphanumeric sorting using LINQ
body: <p>I have a <code>string[]</code> in which every elements ends with some numeric value.</p>
  
  <pre><code>string[] partNumbers = new string[] 
  { 
      "ABC10", "ABC1","ABC2", "ABC11","ABC10", "AB1", "AB2", "Ab11" 
  };
  </code></pre>
  
  <p>I am trying to sort the above array as follows using <code>LINQ</code> but I am not getting the expected result.</p>
  
  <pre><code>var result = partNumbers.OrderBy(x =&gt; x);
  </code></pre>
  
  <p>Actual Result:</p>
  
  <blockquote>
    <p>AB1<br>
    Ab11<br>
    AB2<br>
    ABC1<br>
    ABC10<br>
    ABC10<br>
    ABC11<br>
    ABC2  </p>
  </blockquote>
  
  <p>Expected Result</p>
  
  <blockquote>
    <p>AB1<br>
    AB2<br>
    AB11<br>
    ..</p>
  </blockquote>