Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Running List ForEach using script

0
0
This is what i come out with in the end
public static void forEach(this IEnumerable collection, dynamic action)
        {
            int i = 0;
            foreach (var item in collection)
            {
                action(item, i, collection);
                i++;
            }
        }

Viewing all articles
Browse latest Browse all 2297