title: LINQ Group By using multiple criteria
body: <p>How would I go about grouping a list of objects by two different fields?</p>
  
  <p>e.g.</p>
  
  <pre><code>struct Item
  {
      public string Name;
      public int Age;
      public int Score;
  }
  
  List&lt;Item&gt; items = new List&lt;Item&gt;();
  items.Add(new Item(){ "Jeff", 35, 50};
  items.Add(new Item(){ "Annie", 22, 45};
  items.Add(new Item(){ "Pierce", 60, 90};
  items.Add(new Item(){ "Pierce", 60, 10};
  items.Add(new Item(){ "Abed", 28, 22};
  items.Add(new Item(){ "Troy", 22, 45};
  items.Add(new Item(){ "Troy", 22, 65};
  items.Add(new Item(){ "Troy", 22, 80};
  items.Add(new Item(){ "Troy", 21, 2};
  items.Add(new Item(){ "Troy", 21, 5};
  
  var grouped = items.GroupBy(/*Group by age then name*/);
  </code></pre>
  
  <p>grouped would then be:</p>
  
  <pre><code>"Troy", 21, 2
  "Troy", 21, 5
  
  "Annie", 22, 45
  
  "Troy", 22, 80
  "Troy", 22, 65
  "Troy", 22, 45
  
  "Abed", 28, 22
  
  "Jeff", 35, 50
  
  "Pierce", 60, 90
  "Pierce", 60, 10
  </code></pre>
  
  <p>Most solutions I've found deal with creating a new anonymous type, but that would surely lose the "Score" field. </p>
  
  <p>How do I create a grouping of the original objects where the objects are grouped by multiple criteria?</p>