ImageGear .NET v25.2 - Updated
ImageGear.Web.UI Library / ImageGear.Web.UI Namespace / ImGearPageCollection class / forEach Method

In This Topic
    forEach Method
    In This Topic
    Calls the specified function once for each page in the collection.
    Syntax
    ASP.NET Ajax JavaScript (Specification) 
    function forEach( 
       method : function,
       context : object
    ) : (Any);
    ASP.NET Ajax JavaScript (Usage) 
    var resultVar = instanceOfImGearPageCollection.forEach(function,object);

    Parameters

    method
    The function to call.
    context
    An object that holds the context of the call.
    Remarks

    This function calls the specified function once for each Page in the collection.

    When forEach calls the function, it will set this to context, the first function parameter is the Page being enumerated, the second function parameter is the zero-based index of the iteration, and the third function parameter to the collection.

    This function copies the list of pages before starting the enumeration, so you can safely make changes to the collection during the enumeration process. Any page that you delete during the enumeration will be enumerated; any pages that you add during the enumeration will not be enumerated, and any pages that you change during the enumeration will be enumerated with their new value.

    See Also