CSharp examples for System.Collections.Generic:IEnumerable
Copy IEnumerable to ICollection
using System.Collections.Generic; using System.Collections; using System;// w w w . java 2 s .c om public class Main{ public static void Copy<T>(IEnumerable<T> source, ICollection<T> target) { foreach (T item in source) { target.Add(item); } } }