Background
Still here trying to steal that same old code.
Lineage
- .Net:- Compile Error – ‘System.Data.DataRow’ does not contain a definition for ‘Field’ and no extension method ‘Field’ accepting a first argument of type ‘System.Data.DataRow’
Link
Error Message
Textual
'System.Data.DataRowCollection' does not contain a definition for 'OfType' and no extension method 'OfType' accepting a first argument of type 'System.Data.DataRowCollection' could be found
Image
Explanation
The error states that
- The System.Data.DataRowCollection object is missing the Field Property
- And, that I have yet to provide an extension method else where
Remediation
The clear is unambiguously using LINQ, so reached for it.
C#
using System.Linq;