CSharp examples for System.Collections.Generic:IEnumerable
IEnumerable To Observable Collection
using System.Collections.ObjectModel; using System.Collections.Generic; public class Main{ public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> coll) {/*from w w w . j ava 2s . c o m*/ var c = new ObservableCollection<T>(); foreach (var e in coll) c.Add(e); return c; } }