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);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…