title: Get the index of item in list based on value
body: <p>The scenario is for a football league table. I can order the list by match win percentage and then by goals scored to determine their position in the league. I then use this ordering to get teams position in the league table using the <code>IndexOf</code> function.</p>
  
  <pre><code>this.results = this.results.OrderByDescending(x =&gt; x.WinPercentage).ThenByDescending(x =&gt; x.Goals);
  
  
  this.results.Foreach(x =&gt; x.Position = this.results.IndexOf(x));
  </code></pre>
  
  <p>The problem arises when two teams (should be joint #1) have the same match win percentage and goals scored but when getting the index one team will be assigned #1 and the other #2.</p>
  
  <p>Is there a way to get the correct position?</p>