Created
February 18, 2010 05:15
-
-
Save Garren/307365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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