title: LINQ - Method vs Query Syntax Difference
body: <p>I was working with a DataTable and noticed that Resharper recommended that I can convert a loop into a LINQ expression. I did so and it was rewritten in query expression syntax (simplified):</p>
  
  <pre><code>var test1 = from DataRow row in dt.Rows select row;
  </code></pre>
  
  <p>Personally, I prefer method syntax so rewrote it to this:</p>
  
  <pre><code>var test2 = dt.Rows.Select(row =&gt; row);
  </code></pre>
  
  <p>And it broke.</p>
  
  <blockquote>
    <p>'System.Data.DataRowCollection' does not contain a definition for 'Select' and no 
    extension method 'Select' accepting a first argument of type 'System.Data.DataRowCollection' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>Since query expression are <a href="http://msdn.microsoft.com/en-us/library/bb397947.aspx">translated to method calls</a>, why is that the first works but not the second? I expected either both or neither to work which is obviously not the case.</p>