HashSetExtensions.First<T>

Extension Method in HashSetExtensions

Declaration

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

Description

Returns the first element in the set that satisifies 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 satisifies the predicate.