Skip to content

Instantly share code, notes, and snippets.

@brunossn
Created March 12, 2019 22:33
Show Gist options
  • Save brunossn/197f0ad0820258da27f54f917d11ac49 to your computer and use it in GitHub Desktop.
Save brunossn/197f0ad0820258da27f54f917d11ac49 to your computer and use it in GitHub Desktop.
ObservableCollection.AddRange() extension in C#
public static class ObservableCollectionExtensions
{
public static void AddRange<T>(this ObservableCollection<T> lista, IEnumerable<T> items)
{
foreach(var item in items)
{
lista.Add(item);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment