title: Sum items with certain IDs in IEnumerable of a Custom Class
body: <pre><code>CustomClass{
  int ID;
  int numberToSum;
  float numToAverage;
  }
  
  
  IEnumerable&lt;CustomClass&gt; results = MethodToPopulateIEnumerable();
  List&lt;int&gt; listOfIDs = MethodToGetListOfIDs();
  </code></pre>
  
  <p>What I wish to do with these, is take my <code>IEnumberable&lt;CustomClass&gt;</code> and select all the ones where the ID is in the <code>List&lt;int&gt; listOfIDs</code>, then I wish to sum the <code>numberToSum</code> value of this and save it in a variable and get the average of the <code>numToAverage</code> property and save it in a variable.</p>
  
  <p>What is the most elegant way to do this ?</p>