How to sum and average the whole column

VB:
mySum | Datatype: Double = DtVar.AsEnumerable().Sum(Function (x) CDbl(x(“fiyat”).toString.Trim))

C#:

DtVar.AsEnumerable().Sum(x =>  Convert.ToDouble(x["fiyat"].ToString().Trim()))
1 Like