AI LAB
Thursday, January 3, 2013
How can i convert list to ObservableCollection
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> source)
{
ObservableCollection<T> obsColl = new ObservableCollection<T>();
foreach (T element in source)
{
obsColl.Add(element);
}
return obsColl;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment