DataRow
contains an ItemArray
member which returns all the data in that row as an array, the downside is they are all returned as object
s but if all your columns are the same type you can cast the ItemArray
in line to the desired type (in this case string
)
dtskip.Rows.Cast<DataRow>().Select(r => r.ItemArray.Cast<string>());
This will give you an IEnumerable<IEnumerable<string>>
to work with.