How we find Maximum and minimum value from DataSet
Asked
Active
Viewed 3,288 times
0
-
1!!! Maximum and minimum value of what??? Please be clear . – Ankush Roy Feb 16 '11 at 06:32
-
Kind a similar question http://stackoverflow.com/questions/2442525/how-to-select-min-and-max-values-of-a-column-in-a-datatable – Crimsonland Feb 16 '11 at 06:33
-
1if you are employed in IT or even just a student then you will know that details are very important for an accurate answer, yet you provide none... try and edit your question and include some more. – slugster Feb 16 '11 at 06:47
1 Answers
3
Try to use linq to object like this
dt.Rows.Cast<DataRow>().Max(row => row[ColumnName]);
dt.Rows.Cast<DataRow>().Min(row => row[ColumnName]);

Danil
- 1,883
- 1
- 21
- 22