Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void ForEachWithIndex<TKey>(this IEnumerable<TKey> list, Action<TKey, int> compute)
- {
- if (list == null)
- return;
- var index = 0;
- foreach (var x in list)
- {
- compute(x, index);
- ++index;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement