Skip to content

Instantly share code, notes, and snippets.

@Garren
Created February 18, 2010 05:15
Show Gist options
  • Save Garren/307365 to your computer and use it in GitHub Desktop.
Save Garren/307365 to your computer and use it in GitHub Desktop.
// Ripped off from a StackOverflow thread - just here for my own reference
using System;
using System.Collections.Generic;
namespace ConsoleApplication1 {
public static class EnumerableExtensions {
public static void Each<T>(this IEnumerable<T> collection, Action<T> action) {
foreach (var item in collection) {
action(item);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment