title: Orderby() not ordering numbers correctly c#
body: <p>I am writing an app for my company and am currently working on the search functionality. When a user searches for an item, I want to display the highest version (which is stored in a database).</p>
  
  <p>The problem is, the version is stored as a string instead of int, and when I do an OrderBy(q=>q.Version) on the results, they are returned like</p>
  
  <pre><code>1
  10
  11
  2
  3
  ...
  </code></pre>
  
  <p>Obviously 2 comes before 10.</p>
  
  <p>Is there a way for me to cast the version as an integer or is there a simple IComparer out there? I couldn't find anything substantial thus far.</p>
  
  <p>I tried doing this:</p>
  
  <pre><code>var items = (from r in results
               select r).OrderBy(q =&gt; Int32.Parse(q.Version));
  </code></pre>
  
  <p>This compiles but doesn't work.</p>