System.Collections.Tests.IList_NonGeneric_Tests.IList_NonGeneric_Remove_NullNotContainedInCollection C# (CSharp) Method

IList_NonGeneric_Remove_NullNotContainedInCollection() private method

private IList_NonGeneric_Remove_NullNotContainedInCollection ( int count ) : void
count int
return void
        public void IList_NonGeneric_Remove_NullNotContainedInCollection(int count)
        {
            if (!IsReadOnly && !ExpectedFixedSize && NullAllowed && !Enumerable.Contains(InvalidValues, null))
            {
                int seed = count * 21;
                IList collection = NonGenericIListFactory(count);
                object value = null;
                while (collection.Contains(value))
                {
                    collection.Remove(value);
                    count--;
                }
                collection.Remove(value);
                Assert.Equal(count, collection.Count);
            }
        }
IList_NonGeneric_Tests