Skip to content

Instantly share code, notes, and snippets.

@feliperomero3
Created January 12, 2017 01:13
Show Gist options
  • Save feliperomero3/3c464ec76b79094930b468952e1f0c15 to your computer and use it in GitHub Desktop.
Save feliperomero3/3c464ec76b79094930b468952e1f0c15 to your computer and use it in GitHub Desktop.
.NET Extensions for ICollection<T>
namespace AuditoriaIngresos.Helpers
{
using System;
using System.Collections.Generic;
using System.Linq;
public static class CollectionExtension
{
public static ICollection<T> AddRange<T>(this IEnumerable<T> list, ICollection<T> collection)
{
foreach (T item in list)
{
collection.Add(item);
}
return collection;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment