How to add all the values of a column in Datatable by using Linq (without using for each)

Hey @tgopalas,

Use this:

dt.AsEnumerable().Sum(function(x) x.Amount ) OR dt.AsEnumerable().Sum(function(x) x.Field(“Amount”) )

1 Like