If untyped (replace
int
with the correct data type): var sum = table.AsEnumerable().Sum(x=>x.Field<int>(3));
or:
var sum = table.AsEnumerable().Sum(x=>x.Field<int>("SomeProperty"));
If typed:
var sum = table.Sum(x=>x.SomeProperty);
No comments:
Post a Comment