[This is preliminary documentation and is subject to change.]
Runs some method over each element of src sequence
Namespace: NFXAssembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
public static IEnumerable<T> ForEach<T>(
this IEnumerable<T> src,
Action<T, int> action
)
public static IEnumerable<T> ForEach<T>(
this IEnumerable<T> src,
Action<T, int> action
)
<ExtensionAttribute>
Public Shared Function ForEach(Of T) (
src As IEnumerable(Of T),
action As Action(Of T, Integer)
) As IEnumerable(Of T)
<ExtensionAttribute>
Public Shared Function ForEach(Of T) (
src As IEnumerable(Of T),
action As Action(Of T, Integer)
) As IEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ ForEach(
IEnumerable<T>^ src,
Action<T, int>^ action
)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ ForEach(
IEnumerable<T>^ src,
Action<T, int>^ action
)
static member ForEach :
src : IEnumerable<'T> *
action : Action<'T, int> -> IEnumerable<'T>
static member ForEach :
src : IEnumerable<'T> *
action : Action<'T, int> -> IEnumerable<'T>
- T
- Sequence item type
Return Value
Type:
IEnumerable 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
IEnumerable T . 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).