Edit

Share via


ObservableGroupedCollectionExtensions.FirstOrDefault<TKey,TValue> Method

Definition

Return the first group with key key or null if not found.

public static CommunityToolkit.Common.Collections.ObservableGroup<TKey,TValue>? FirstOrDefault<TKey,TValue> (this CommunityToolkit.Common.Collections.ObservableGroupedCollection<TKey,TValue> source, TKey key);
static member FirstOrDefault : CommunityToolkit.Common.Collections.ObservableGroupedCollection<'Key, 'Value> * 'Key -> CommunityToolkit.Common.Collections.ObservableGroup<'Key, 'Value>
<Extension()>
Public Function FirstOrDefault(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

key
TKey

The key of the group to query.

Returns

The first group matching key or null.

Applies to