title: Cast collection from IGrouping to IEnumerable
body: <p>I have a very large collection consistings in my millions of elements. I need to keep everything as IEnumerable otherwise I get an OutOfMemoryException.
  My problem is that I have to do some grouping like that : </p>
  
  <pre><code>IEnumerable&lt;MyClass&gt; mycollection = dao.RetrieveBigCollection-();
  var mycollection = mycollection.GroupBy(x =&gt; x.Date1);
  </code></pre>
  
  <p>And later in the program, the collection will be fetched by some library which uses reflection. The problem is that after grouping the collection is of type IGrouping, and this library expects a <code>IEnumerable&lt;MyClass&gt;</code>. I need to convert it back to a <code>IEnumerable&lt;MyClass&gt;</code>, and my constraint is that I cannot call ToList() otherwise I get an OutOfMemoryException.</p>
  
  <p>Any idea ? </p>