Question
C# About IEnumerable<T>.Aggregate
I did some tests about IList<T>.Aggregate()
, but the answer does not make sense to me.
List<int> Data1 = new List<int> { 1,0,0,0,0};
var result = Data1.Aggregate<int>((total, next) => total + total);
The result is 16
.
I expected it to be 32
.
Can someone explain?
21 2466
21