Executes an action for each element in the source collection.
Namespace: DotNetNuke.CollectionsAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
public static IEnumerable<TType> ForEach<TType>( this IEnumerable<TType> source, Action<TType> action ) |
Visual Basic |
---|
<ExtensionAttribute> Public Shared Function ForEach(Of TType) ( source As IEnumerable(Of TType), action As Action(Of TType) ) As IEnumerable(Of TType) |
Parameters
- source
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'TType>)>)>
The source.
- action
- Type: System..::..Action<(Of <(<'TType>)>)>
The action.
Type Parameters
- TType
- The type of the type.