ObservableGroupedCollectionExtensions.First<TKey,TValue> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return the first group with key
key.
public static CommunityToolkit.Common.Collections.ObservableGroup<TKey,TValue> First<TKey,TValue> (this CommunityToolkit.Common.Collections.ObservableGroupedCollection<TKey,TValue> source, TKey key);
static member First : CommunityToolkit.Common.Collections.ObservableGroupedCollection<'Key, 'Value> * 'Key -> CommunityToolkit.Common.Collections.ObservableGroup<'Key, 'Value>
<Extension()>
Public Function First(Of TKey, TValue) (source As ObservableGroupedCollection(Of TKey, TValue), key As TKey) As ObservableGroup(Of TKey, TValue)
Type Parameters
- TKey
The type of the group key.
- TValue
The type of the items in the collection.
Parameters
The source ObservableGroupedCollection<TKey,TValue> instance.
- key
- TKey
The key of the group to query.
Returns
The first group matching key
.
Exceptions
The target group does not exist.