0

How we find Maximum and minimum value from DataSet

anjum
  • 2,363
  • 6
  • 28
  • 25
  • 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
  • 1
    if 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 Answers1

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