[This is preliminary documentation and is subject to change.]
Group the collection using a function which returns the key.
Namespace:
Assembly: Facebook (in Facebook.dll) Version: 0.2009.3.23 (0.2009.3.23)
Syntax
C# |
---|
public static Dictionary<K, List<V>> GroupBy<K, V>( ICollection<V> source, Func<V, K> keySelector ) |
Visual Basic (Declaration) |
---|
Public Shared Function GroupBy(Of K, V) ( _ source As ICollection(Of V), _ keySelector As Func(Of V, K) _ ) As Dictionary(Of K, List(Of V)) |
Visual C++ |
---|
public: generic<typename K, typename V> static Dictionary<K, List<V>^>^ GroupBy( ICollection<V>^ source, Func<V, K>^ keySelector ) |
Parameters
- source
- Type: System.Collections.Generic..::.ICollection<(Of <(V>)>)
The source collection to group.
- keySelector
- Type: System..::.Func<(Of <(V, K>)>)
The key selector.
Type Parameters
- K
[Missing <typeparam name="K"/> documentation for "M:Facebook.Json.Utilities.CollectionUtils.GroupBy``2(System.Collections.Generic.ICollection{``1},System.Func{``1,``0})"]
- V
[Missing <typeparam name="V"/> documentation for "M:Facebook.Json.Utilities.CollectionUtils.GroupBy``2(System.Collections.Generic.ICollection{``1},System.Func{``1,``0})"]