예제 #1
0
        public void RemoveWhereTest()
        {
            var collection = new MyObservableCollection <int>();

            collection.AddRange(Enumerable.Range(0, 31));
            collection.RemoveWhere(val =>
            {
                int remainder;
                int div = Math.DivRem(val, 3, out remainder);
                return(remainder == 0);
            });
            collection.ForEach(val =>
            {
                int remainder;
                int div = Math.DivRem(val, 3, out remainder);
                Assert.IsFalse(remainder == 0);
            });
        }