Linq for Sum of the Total column, required in Method syntax

image

Hi @Pujari_Manjunatha

Assuming that the column you want to sum is the total, give a try with the following

dtInput.AsEnumerable().Sum(Function(r) Convert.ToDouble(r("Total").ToString().Trim()))

Store the result in a Double Type variable

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.