title: Found minimum and maximum value from dataset containing multiple tables
body: <p>I am developing an asp.net application where i have a dataset having 3 tables i.e. <code>ds.Tables[0], Tables[1] and Tables[2]</code></p>
  
  <p>I need to find minimum number and maximum number out of all the 3 tables of dataset. How to do that?</p>
  
  <p>I found similar question in SO <a href="https://stackoverflow.com/questions/2442525/how-to-select-min-and-max-values-of-a-column-in-a-datatable">here</a> but not sure how that would help me getting my way?</p>
  
  <p><strong>UPDATED:</strong>  </p>
  
  <pre><code> double minValue = double.MinValue;
   double maxValue = double.MaxValue;
   foreach (DataRow dr in dtSMPS.Rows)
   {
              double actualValue = dr.Field&lt;double&gt;("TOTAL_SUM");  // This fails specifying type cast error
              minValue = Math.Min(minValue, actualValue);
              maxValue = Math.Max(maxValue, actualValue);
   }
  </code></pre>
  
  <p>Please guide! Thanks.</p>