Applies a function f to all elements of this list. Also passes an element index (long) to function f.

Namespace: Flinq
Assembly: Flinq (in Flinq.dll) Version: 1.0.2.0 (1.0.2.0)

Syntax

C#
public static void ForEach<A>(
	this IEnumerable<A> source,
	Action<A, long> f
)

Parameters

source
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The input sequence.
f
Type: System..::..Action<(Of <(<'A, Int64>)>)>
The function that is applied for its side-effect to every element.

Type Parameters

A
The type of the elements in the input sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'A>)>)>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also