I am trying to run the following code on a .net 2 winforms app:
DataTable dt = this.GetData(null, null, true, sql);
DateTime minDate = (from f in dt.AsEnumerable()
select f.Field<DateTime>("Timestamp")).Min();
I am getting errors for the "using system.linq" and the ".AsEnumerable()". Is there any way I can resolve this to use AsEnumerable()? Or should I just abandon this method?
Thanks!