System.Collections.ArrayList.IListWrapper.RemoveRange C# (CSharp) Method

RemoveRange() public method

public RemoveRange ( int index, int count ) : void
index int
count int
return void
            public override void RemoveRange(int index, int count)
            {
                if (index < 0 || count < 0)
                    throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
                Contract.EndContractBlock();
                if (_list.Count - index < count)
                    throw new ArgumentException(SR.Argument_InvalidOffLen);

                if (count > 0)    // be consistent with ArrayList
                    _version++;

                while (count > 0)
                {
                    _list.RemoveAt(index);
                    count--;
                }
            }