Skip to content

Instantly share code, notes, and snippets.

@dkudelko
Created September 23, 2015 09:12
Show Gist options
  • Save dkudelko/077af188a9bdfb06cf4b to your computer and use it in GitHub Desktop.
Save dkudelko/077af188a9bdfb06cf4b to your computer and use it in GitHub Desktop.
ToObservableCollection<T>
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> enumerable)
{
var col = new ObservableCollection<T>();
foreach (var cur in enumerable)
{
col.Add(cur);
}
return col;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment