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: 
Do it on `IOrganisation`(and have `IPeople` as the return type).

Something like this:

```
interface IOrganisation {
    IList<IPeople> GetPeople();
}

```

This is because the people of an organisation is a property of the organisation, not of the people.
That sounds like it should be on `IOrganization` - that's what you'll call it on, after all. What you *have* is the organization, you *want* the list of people - you can't *start* fromt the list of people, so it *must* be part of the `IOrganization` interface.

I find it strange to have *plural* interface names to start with - I'd expect `IOrganization` for a single organization, and `IPerson` for a single person.

```
public interface IOrganization {
    IList<IPerson> GetPeople();
}

```