Click or drag to resize
IEnumerableExtensionsForEachT Method (IEnumerableT, ActionT, Int32)
Calls an action on each element of a sequence. The action takes two arguments: an element and the index of the element. It has no return value.

Namespace: Bio.Util
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public static void ForEach<T>(
	this IEnumerable<T> sequence,
	Action<T, int> action
)

Parameters

sequence
Type: System.Collections.GenericIEnumerableT
the input sequence
action
Type: SystemActionT, Int32
An action that takes an element and an index and returns nothing.

Type Parameters

T
the type of the elements

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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