Click or drag to resize

ExtensionsForeachT Method

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static IEnumerable<T> Foreach<T>(
	this IEnumerable<T> collection,
	Action<T> action
)

Parameters

collection
Type: System.Collections.GenericIEnumerableT
The collection to perform the action on
action
Type: SystemActionT
The ActionT delegate to perform on each element of the IEnumerableT.

Type Parameters

T
The type that is contained in the IEnumerableT

Return Value

Type: IEnumerableT
Returns collection

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).
Exceptions
ExceptionCondition
ArgumentNullExceptionaction is null
See Also