I am trying get the max value of a ushort type column from a DataTable.
It throws up "Specified Cast is Not Valid"
Here is the query
var c = DSFinyr.Tables[0].AsEnumerable().Max(p => p.Field<ushort>("finid"));
tried with int also. same error.
How do i cast this ?
thanks