Skip to content

Instantly share code, notes, and snippets.

@staxmanade
Created October 5, 2011 18:02
Show Gist options
  • Save staxmanade/1265180 to your computer and use it in GitHub Desktop.
Save staxmanade/1265180 to your computer and use it in GitHub Desktop.
Concating enumerables (just a thought)
public static class EnumerableEx
{
public static IEnumerable<T> Concat<T>(params IEnumerable<T>[] enumerables)
{
if (enumerables == null) throw new ArgumentNullException("enumerables");
return enumerables.SelectMany(i => i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment