Virtu/Library/IEnumerableExtensions.cs
Sean Fausett 27a5e3ac89 Add git attributes file.
Normalize text files.
2013-06-18 16:52:34 +12:00

26 lines
582 B
C#

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