title: Using DataGridViewRowCollection object in LINQ
body: <p>I'd like to use a <code>DataGridViewRowCollection</code> in a LINQ expression using extension methods and lambda expressions. Unfortunately, the extension methods are for types <code>IEnumerable&lt;T&gt;</code>, which <code>DataGridViewRowCollection</code> doesn't implement. The funny thing is, I can use LINQ here with the SQL-like syntax:</p>
  
  <pre><code>IEnumerable&lt;DataGridViewRow&gt; lRows = from DataGridViewRow row in dgvGrid.Rows 
                                       select row;
  </code></pre>
  
  <p>After doing that, I <em>can</em> use LINQ extension methods:</p>
  
  <pre><code>foreach (DataGridViewRow lRow in lRows.Where(row =&gt; row.index &gt; 4)) { ... }
  </code></pre>
  
  <p>Is there any way I can convert my <code>DataGridViewRowCollection</code> to an <code>IEnumerable&lt;&gt;</code> without using that long first statement? The same thing applies to <code>DataGridViewCellCollection</code> and <code>DataGridViewColumnCollection</code>.</p>
  
  <p>ps. I'm using .net framework 3.5</p>