SortedSetExtensions.First<T>

Extension Method in SortedSetExtensions

Declaration

public static T First<T>(this SortedSet<T> set, Predicate<T> predicate)

Description

Returns the first element in the set that satisfies a predicate.

Type Parameters

TThe type of the elements in the set.

Parameters

setThe set to get the element from.
predicateThe predicate to use.

Returns

TThe first element in the set that satisfies the predicate, or default(T) if no item satisfies the predicate.