Created
March 12, 2019 22:33
-
-
Save brunossn/197f0ad0820258da27f54f917d11ac49 to your computer and use it in GitHub Desktop.
ObservableCollection.AddRange() extension in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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