Performing Arithmetic on DataTable Columns

  • Thread starter Thread starter George Durzi
  • Start date Start date
Nevermind, I discovered the Compute method.

float flMax =
(float)m_dsSegments.Tables["Calculations"].Compute("Max(Score)",
string.Empty);
 
If your contents are bound to a dataset why don't you just use the dataset
ds.Tables[0].Compute("Max(["+strColumnName+"])",String.Empty)
 
Back
Top