About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Grouping and Joining

Slightly more complex query functionality exists in the family of grouping and joining operators. The number of overloads for those standard query operators may be frightening at first, so let’s take a closer look.

GroupBy

To put elements in buckets with similar properties, grouping operations are used. No fewer than eight overloads exist for the GroupBy operator, which by themselves can be grouped into some categories. One set of overloads exposes a sequence containing IGrouping<TKey, TElement> objects, which contain the grouping key and the elements that go with it (because each grouping object is also an IEnumerable):

public interface IGrouping<out TKey, out TElement> : IEnumerable<TElement> ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required