Mono Class Library: System.Array Overview | Members

System.Array.Find<T> Method

Searches for an element that matches the predicate, and returns the first occurrence within the entire array. [Edit]

public static T Find<T> (T[] array, Predicate<T> match)

Type Parameters

T
Documentation for this section has not yet been entered. [Edit]

Parameters

array
The array to search. [Edit]
match
The predicate that defines the conditions of the element to search for. [Edit]

Returns

The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type T. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionarray or match is null. [Edit]

Remarks

The elements of array are individually passed to the predicate, moving forward in the array, starting with the first element and ending with the last element. Processing is stopped when the predicate returns true. [Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0