title: C# List<string> OrderBy Split
body: <p>I'm trying to just Order a list by the value after a split.</p>
  
  <p>For example my data looks like this.</p>
  
  <pre><code>Z|2  
  A|1
  </code></pre>
  
  <p>I want my list to be order by the value after the split</p>
  
  <p>so I would get</p>
  
  <pre><code>A|1  
  Z|2  
  </code></pre>
  
  <p>This is what i'm using but I get the error: </p>
  
  <blockquote>
    <p><em>{"Input string was not in a correct format."}</em></p>
  </blockquote>
  
  <p><code>All = All.OrderBy(s =&gt; int.Parse(s.Split('|')[1])).ToList();</code></p>
  
  <p>Any help would be awesome!  Thanks!</p>