Questions tagged [igrouping]

The .NET interface for a collection of objects with a common key

The IGrouping interface, introduced in as part of , represents "a collection of objects with a common key".

It is typically encountered as a result of a GroupBy operation - for example

IGrouping<System.Reflection.MemberTypes, System.Reflection.MemberInfo> group =
    typeof(String).GetMembers().
    GroupBy(member => member.MemberType).
    First();

The members of the interface are used when handling results of any GroupBy operation. Questions that deal with handling the results of such GroupBy operations, or which otherwise construct objects that implement this interface, are expected to have this tag.

The interface itself defines available methods and properties which generally involve working with the objects inside the collection (or group).

76 questions
-3
votes
2 answers

C# LINQ convert IEnumerable to IEnumerable elegantly?

If you have an IEnumerable>, say from var ans = src.GroupBy(s => s.Field); Is there a better way (rarely used LINQ method/variation) to convert to an IEnumerable> then nested Selects like so: var ans2 = ans.Select(g…
NetMage
  • 26,163
  • 3
  • 34
  • 55
1 2 3 4 5
6