Question: 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](https://stackoverflow.com/questions/2442525/how-to-select-min-and-max-values-of-a-column-in-a-datatable) 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.

Answer: 
First of all, your should probably not have pluralized interface names. So call them IOrganization and IPerson and then on your `IOrganisation` interface you might have a method called:

```
IEnumerable<IPerson> GetPeople()

```
If you think of an organization as a collection containing people, then it's intuitive to put that in `IOrganization`. It would look like this:

```
interface IOrganization
{
  IList<IPeople> Members { get; }
}

```