using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace ArdupilotMega.Utilities { public static class CollectionExtensions { /// /// Performs the specified on each element of the . /// /// /// An enumerable instance. /// public static void ForEach(this IEnumerable enumerable, Action action) { foreach (object obj in enumerable) action(obj); } /// /// Performs the specified on each element of the . /// /// /// An enumerable instance. /// public static void ForEach(this IEnumerable enumerable, Action action) { foreach (T obj in enumerable) action(obj); } /// /// Performs the specified on each element of the . /// /// /// The type contained in the . /// public static void ForEach(this IEnumerable enumerable, Action action) { foreach (T obj in enumerable) action(obj); } } }