CSharp examples for System.Collections.Generic:IList
Remove Items from IList
using System.Collections; using System.Collections.Specialized; using System.Collections.ObjectModel; using System.Text; using System.Collections.Generic; using System;//ww w . jav a 2 s. c o m public class Main{ public static void RemoveItems<T>(IList<T> collection, Equal<T, object> eq, IEnumerable items) { foreach (var item in items) { collection.Remove( FindElement(collection, t => eq(t, item))); } } }