Tag Archives: LINQ

Linq Aggregate Empty Sequence

Linq is great for its compact expressions, and for its — usually efficient — lazy-evaluation. These two virtues seem to be spit upon by the Aggregate function. Say you want to aggregate a list of ints. var s = new int[] {1, 2, 3}; int sum = ints.Aggregate((a,b) => a + b); This works great [...]
Posted in Software Development, Technology | Also tagged | 1 Comment