Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Extensions Namespace / IEnumerableExtension Class / ForEach<T> Method
The element type of the IEnumerableT
The IEnumerableT object.
The ActionT delegate to perform on each element of the IEnumerableT.
In This Topic
    ForEach<T> Method
    In This Topic
    Performs the specified action on each element of the IEnumerableT.
    Syntax
    [Extension()]
    public static void ForEach<T>( 
       IEnumerable<T> source,
       Action<T> action
    )

    Parameters

    source
    The IEnumerableT object.
    action
    The ActionT delegate to perform on each element of the IEnumerableT.

    Type Parameters

    T
    The element type of the IEnumerableT
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also