Click or drag to resize
ArrayForEachT Method
Performs the specified action on each element of the specified array.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static void ForEach<T>(
	T[] array,
	Action<T> action
)

Parameters

array
Type: T
The one-dimensional, zero-based Array on whose elements the action is to be performed.
action
Type: SystemActionT
The ActionT to perform on each element of array.

Type Parameters

T
The type of the elements of the array.
Exceptions
ExceptionCondition
ArgumentNullExceptionarray is null.-or-action is null.
See Also