C#/.NET Little Wonders: Five Easy Sequence Aggregators

added by rcash
8/28/2011 7:46:59 PM

176 Views

Here are five easy ways to aggregate sequences. Often times looking at a sequence of objects, we want to perform some sort of aggregation across those sequences. The methods we will be looking at are LINQ extension methods.


1 comments

vijayst
8/28/2011 11:52:04 PM
LINQ is a wonderful framework for doing complex operations on sequences. My favorite is to make a distinct set of elements from a repeating set of elements. Before, I used to write code which loops through each element and do some comparisons. With LINQ, it is as simple as List.Distinct<className> ();