title: Querying a list to find the count of an ID and merge the contents of two similar IDs
body: <p>I have a generic C# list <code>List&lt;object&gt; Results</code> which has several fields with several rows of data in it as follows</p>
  
  <pre><code>List&lt;object&gt; Results
  </code></pre>
  
  <p>Data:</p>
  
  <pre><code>TrdID    Date       Price Seller Buyer  Side
  1000     7/23/2015   1     ABC    NULL   2 
  1000     7/23/2015   1     NULL   XYZ    1
  1002     7/22/2015   1.5   NULL   ABC    1
  1002     8/22/2015   1.5   NULL   ABC    1
  1002     7/22/2015   1.5   XYZ    NULL   2
  1002     8/22/2015   1.5   XYZ    NULL   2
  1010     8/23/2015   2     ACB    NULL   2 
  1010     8/23/2015   2     NULL   PQR    1
  </code></pre>
  
  <p>The above list has records whose IDs are repeated and I want to merge records whose <code>IDs</code> are repeated twice. And the two records with same <code>IDs</code> will have same values except <code>Seller</code> and <code>Buyer</code> where <code>Seller</code> is <code>NULL</code> when <code>Side=1</code> and <code>Buyer</code> is NULL when Side=2  and merge them into a single record by replacing the NULL values with its subsequent other Side and the resultant list will be as follows</p>
  
  <p><strong>Expected Results</strong></p>
  
  <pre><code>TrdID    Date       Price Seller Buyer  
  1000     7/23/2015   1     ABC    XYZ  
  1010     8/23/2015   2     ACB   PQR
  </code></pre>
  
  <p>As you can see from the above results that <code>IDs 1000 and 1010</code> are repeated twice, so it merged each of their <code>Seller</code> and <code>Buyer</code> Values and <code>ID 1002</code> is discarded as their <code>Count</code> is not 2</p>
  
  <p>May I know a way to solve this?</p>