Created
September 23, 2015 09:12
-
-
Save dkudelko/077af188a9bdfb06cf4b to your computer and use it in GitHub Desktop.
ToObservableCollection<T>
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 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