I believe the following should work:
IEnumerable<DataRow> d = myDataTable.AsEnumerable();
But it doesn't! I get:
Error CS1061: Type
System.Data.DataTable
does not contain a definition forAsEnumerable
and no extension methodAsEnumerable
of typeSystem.Data.DataTable
could be found (are you missing a using directive or an assembly reference?)
I have System.Data.DataSetExtensions
as a reference and this is Mono 3.5 and MonoDevelop 2.4.2. I also have
using System;
using System.Data;
using System.Data.Linq;
using System.Collections.Generic;