title: Why can't I do foreach (var Item in DataTable.Rows)?
body: <p>Is there a reason why I can't do the following:</p>
  
  <pre><code>foreach (var Item in DataTable.Rows) {
  </code></pre>
  
  <p>rather than having to do</p>
  
  <pre><code>foreach (DataRow Item in DataTable.Rows) {
  </code></pre>
  
  <p>I would have thought this was possible, like it is on other datatypes. For example:</p>
  
  <pre><code>foreach (var Employee in Staff) { // string[] Staff etc...
  </code></pre>
  
  <p>When I try the first foreach loop, I get the the error <strong>CS0021: Cannot apply indexing with [] to an expression of type 'object'</strong>.</p>
  
  <p>Why can't the compiler figure out that .Rows returns a collections of DataRows?</p>