Is there a possible way to iterate N-numbers in LINQ to get a sum on it?
for instance:
var n = 3;
//The part I wonder about if you can do this entirely with LINQ
var t = 0;
for (var i = 0; i < n; i++){
t += i;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…