var sum = dtMaxMinTemperature.AsEnumerable().Sum(x => x.Field<double?>(iColCount));
iColCount is a column index
you can use column name if you know
var sum = dtMaxMinTemperature.AsEnumerable().Sum(x => x.Field<double?>("ColName"));
iColCount is a column index
you can use column name if you know
var sum = dtMaxMinTemperature.AsEnumerable().Sum(x => x.Field<double?>("ColName"));
No comments:
Post a Comment