EnumerableExtensions.

ForEach<T>(IEnumerable<T>, Action<T>) Method

Summary

Performs the specified action on each element of the IEnumerable<T>.

Syntax

public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)

Type Parameters

Name Description
T The type of the elements of the input sequence.

Parameters

Name Type Description
source IEnumerable<T> The sequence of elements to execute the IEnumerable<T>.
action Action<T> The System.Action`1 delegate to perform on each element of the IEnumerable<T>1.

Return Value

Type Description
void