Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Reverse() [2/2]

override void System.Collections.ArrayList.IListWrapper.Reverse ( int index,
int count )
inlinevirtual

Reimplemented from System.Collections.ArrayList.

Definition at line 433 of file ArrayList.cs.

434 {
435 if (index < 0 || count < 0)
436 {
437 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
438 }
439 if (_list.Count - index < count)
440 {
441 throw new ArgumentException(SR.Argument_InvalidOffLen);
442 }
443 int num = index;
444 int num2 = index + count - 1;
445 while (num < num2)
446 {
447 object value = _list[num];
448 _list[num++] = _list[num2];
449 _list[num2--] = value;
450 }
451 _version++;
452 }

References System.Collections.ArrayList.IListWrapper._list, System.Collections.ArrayList._version, System.SR.Argument_InvalidOffLen, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.count, System.Collections.ICollection.Count, System.index, and System.value.