System.Collections.ArrayList.IListWrapper.Reverse C# (CSharp) Метод

Reverse() публичный Метод

public Reverse ( int index, int count ) : void
index int
count int
Результат void
            public override void Reverse(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);

                int i = index;
                int j = index + count - 1;
                while (i < j)
                {
                    Object tmp = _list[i];
                    _list[i++] = _list[j];
                    _list[j--] = tmp;
                }
                _version++;
            }