title: LINQ GroupBy by several values with IComparable exception
body: <p>I have list with possible values</p>
  
  <p>|Team| |Year| Wins|
  "Team1" 2014  <strong>7</strong>
  "Team2" 2015  9
  "Team1" 2014  <strong>8</strong></p>
  
  <p>I wanna get result as </p>
  
  <p>|Team| |Year| Wins|
  "Team1" 2014  <strong>15</strong>
  "Team2" 2015  9</p>
  
  <p>I try to do that but I get <strong>At least one one object must implement Icomparable</strong></p>
  
  <pre><code> gameResults =
                      gameResults.GroupBy(t =&gt; new{t.ContendersName, t.Year})
                      .OrderBy(g =&gt; g.Key)
                      .Select(g =&gt; new PivotTeamResult()
                         {
                             ContendersName = g.Key.ContendersName,
                             Year = g.Key.Year,
                             Wins = g.Sum(x =&gt; x.Wins)                          
  
                         }).ToList();
  </code></pre>
  
  <p>I implement IComparable as </p>
  
  <p>public int CompareTo(object obj)
          {</p>
  
  <pre><code>        PivotTeamResult teamResult = (PivotTeamResult)obj;
  
          if (this.ContendersName == teamResult.ContendersName)
          {
                return this.Year.CompareTo(teamResult.Year);
          }
  
          return teamResult.ContendersName.CompareTo(this.ContendersName);
      }
  </code></pre>
  
  <p>How I can get right result?</p>