CSharp examples for System.Collections:ICollection
Add Range of element to ICollection
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Specialized; using System.Collections.Generic; using System;// w w w . j a v a2s .co m public class Main{ public static ICollection<T> AddRange<T>(this ICollection<T> list, IEnumerable<T> items) { foreach (var item in items) { list.Add(item); } return list; } }