IEnumerable<T>.First(TPredicate<T>) Method

Returns the first element in a sequence that satisfies a specified condition.

Namespace: Spring.Collections
public
 function First(const predicate: TPredicate<T>): T; overload;

Parameters

predicate
Type: TPredicate<T>

A function to test each element for a condition.

Return Value

Type: T

The first element in the sequence that passes the test in the specified predicate function.