Skip to content

Instantly share code, notes, and snippets.

@aroder
Created June 30, 2010 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aroder/459055 to your computer and use it in GitHub Desktop.
Save aroder/459055 to your computer and use it in GitHub Desktop.
public static class ObservableCollectionExt {
public static void Populate<T>(this ObservableCollection<T> collection, IEnumerable<T> itemsToAdd) {
collection.Clear();
foreach (T item in itemsToAdd)
{
collection.Add(item);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment