I have a linq query:
var dataPerDay = (from myRow in eartTideDataTable.AsEnumerable()
where myRow.Field<string>(1) == date
select myRow);
Simply, I want to change the dataPerDay from var to DataRow[] but I can't do this. I already search in some website but I did not found something match with my case.
I just want to make something like this (see the // marks):
DataRow[] dataPerDay = (from myRow in eartTideDataTable.AsEnumerable()
where myRow.Field<string>(1) == date
select myRow)//Action Like => .ToDataRow()//;
How to to do this?
Use ToArray()
DataRow[] dataPerDay = (from myRow in eartTideDataTable.AsEnumerable()
where myRow.Field<string>(1) == date
select myRow).ToArray();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With