I am developing an asp.net application where i have a dataset having 3 tables i.e. ds.Tables[0], Tables[1] and Tables[2]
I need to find minimum number and maximum number out of all the 3 tables of dataset. How to do that?
I found similar question in SO here but not sure how that would help me getting my way?
UPDATED:
double minValue = double.MinValue;
double maxValue = double.MaxValue;
foreach (DataRow dr in dtSMPS.Rows)
{
double actualValue = dr.Field<double>("TOTAL_SUM"); // This fails specifying type cast error
minValue = Math.Min(minValue, actualValue);
maxValue = Math.Max(maxValue, actualValue);
}
Please guide! Thanks.