 | LinqExtensionsForEachT Method |
A generic LINQ equivalent of C# foreach loop.
Namespace:
CSScriptLib
Assembly:
CSScriptLib (in CSScriptLib.dll) Version: 1.3.2.0
Syntaxpublic static IEnumerable<T> ForEach<T>(
this IEnumerable<T> collection,
Action<T> action
)
Parameters
- collection
- Type: System.Collections.GenericIEnumerableT
The collection. - action
- Type: SystemActionT
The action.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:CSScriptLib.LinqExtensions.ForEach``1(System.Collections.Generic.IEnumerable{``0},System.Action{``0})"]
Return Value
Type:
IEnumerableT[Missing <returns> documentation for "M:CSScriptLib.LinqExtensions.ForEach``1(System.Collections.Generic.IEnumerable{``0},System.Action{``0})"]
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