title: Linq to dataset - Sum method - Specified cast is not valid
body: <p>I am getting the error of "Specified cast is not valid" for this statement. The field present at index 3 is float based in the datatable (coming from the db). I tried even by replacing Decimal with int and float. It didn't work</p>
  
  <p>dtData is a datatable obj.</p>
  
  <pre><code>var aggrVal = dtData.AsEnumerable().Sum(k =&gt; k.Field&lt;Decimal&gt;(3));
  </code></pre>
  
  <p>Please suggest.</p>