| LinqHelperDoT Method (IEnumerableT, ActionT) |
Performs the given action on each element in a sequence when it is enumerated.
Namespace: DigitalRune.LinqAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax public static IEnumerable<T> Do<T>(
this IEnumerable<T> source,
Action<T> action
)
<ExtensionAttribute>
Public Shared Function Do(Of T) (
source As IEnumerable(Of T),
action As Action(Of T)
) As IEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<T>^ Do(
IEnumerable<T>^ source,
Action<T>^ action
)
[<ExtensionAttribute>]
static member Do :
source : IEnumerable<'T> *
action : Action<'T> -> IEnumerable<'T>
Parameters
- source
- Type: System.Collections.GenericIEnumerableT
A sequence that contains the elements on which to perform action.
- action
- Type: SystemActionT
The action to execute on each element.
Type Parameters
- T
- The type of elements.
Return Value
Type:
IEnumerableTThe sequence of elements.
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 Remarks See Also