Mono Class Library: System.Array Overview | Members

System.Array.ForEach<T> Method

Performs the specified action on each element of the specified array. [Edit]

public static void ForEach<T> (T[] array, Action<T> action)

Type Parameters

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

Parameters

array
The array on whose elements the action is to be performed. [Edit]
action
The action to perform on each element of array. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionarray or action is null. [Edit]

Remarks

The elements of array are individually passed to the action. The elements of the current array are individually passed to the action delegate, sequentially, in index order, and on the same thread as that used to call ForEach. Execution stops if the action throws an exception. [Edit]

Requirements

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