//int iCount1 = _dtRainfall.AsEnumerable()
// .Where(s => s.Field<bool>("Select").Equals(true)).Count();
double avgElevationValue = _dtRainfall.AsEnumerable()
.Where(s => s.Field<bool>("Select").Equals(true))
.Average(x => Convert.ToDouble(x.Field<string>("Elevation")));
Count and Avg Value of Columns
// .Where(s => s.Field<bool>("Select").Equals(true)).Count();
double avgElevationValue = _dtRainfall.AsEnumerable()
.Where(s => s.Field<bool>("Select").Equals(true))
.Average(x => Convert.ToDouble(x.Field<string>("Elevation")));
Count and Avg Value of Columns
No comments:
Post a Comment