title: C# select elements from IList
body: <p>I have a list of objects, <code>IList&lt;O&gt;</code>.
  <code>O</code> has several properties but only two of them are relevant: <code>Date</code> and <code>Duration</code>.</p>
  
  <p>I want to "split" the list into several lists that contain only the objects that have matching Date and Duration Properties.</p>
  
  <p>Example:</p>
  
  <pre>
  0- Date==1, Duration==7  
  1- Date==1, Duration==7  
  2- Date==2, Duration==7  
  3- Date==2, Duration==7  
  4- Date==2, Duration==14  
  5- Date==2, Duration==14  
  </pre>
  
  <p>Desired result (IList&lt;IList&lt;O&gt;&gt;):</p>
  
  <pre>
  0-  
   0- Date==1, Duration==7  
   1- Date==1, Duration==7  
  1-  
   0- Date==2, Duration==7  
   1- Date==2, Duration==7  
  2-  
   0- Date==2, Duration==14  
   1- Date==2, Duration==14  
  </pre>
  
  <p>I know this can be done with some LINQ selects but am not sure how.</p>