Click or drag to resize
ListTFind Method
Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire ListT.

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public T Find(
	Predicate<T> match
)

Parameters

match
Type: SystemPredicateT
The PredicateT delegate that defines the conditions of the element to search for.

Return Value

Type: T
The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type T.
Exceptions
ExceptionCondition
ArgumentNullExceptionmatch is null.
See Also