CSharp examples for System.Collections.ObjectModel:ObservableCollection
Add Range for ObservableCollection
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.ObjectModel; using System.Collections.Generic; using System.Collections; using System;//w w w . j av a2 s . c o m public class Main{ public static void AddRange<T>(this ObservableCollection<T> collection, IEnumerable<T> data) { foreach (var x in data) { collection.Add(x); } } }