CollectionUtils ForEach T  Method (IEnumerable T , Action T, Int32 )NFX Class Library

[This is preliminary documentation and is subject to change.]

Runs some method over each element of src sequence

Namespace: NFX
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

public static IEnumerable<T> ForEach<T>(
	this IEnumerable<T> src,
	Action<T, int> action
)

Parameters

src
Type: OnlineSystem.Collections.Generic IEnumerable T 
Source sequence
action
Type: OnlineSystem Action T, OnlineInt32 
Method to call on each element and its sequence number
Type Parameters

T
Sequence item type

Return Value

Type: OnlineIEnumerable T 
Source sequence (to have ability to chain similar calls)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type OnlineIEnumerable T . When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
See Also