using System; using System.Collections.Generic; namespace Jellyfish.Library { public static class IEnumerableExtensions { public static void ForEach(this IEnumerable source, Action action) { if (source == null) { throw new ArgumentNullException("source"); } if (action == null) { throw new ArgumentNullException("action"); } foreach (T item in source) { action(item); } } } }