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

◆ LastIndexOf() [6/6]

virtual int System.Collections.ArrayList.LastIndexOf ( object? value,
int startIndex,
int count )
inlinevirtualinherited

Definition at line 2558 of file ArrayList.cs.

2559 {
2560 if (Count != 0 && (startIndex < 0 || count < 0))
2561 {
2562 throw new ArgumentOutOfRangeException((startIndex < 0) ? "startIndex" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
2563 }
2564 if (_size == 0)
2565 {
2566 return -1;
2567 }
2568 if (startIndex >= _size || count > startIndex + 1)
2569 {
2570 throw new ArgumentOutOfRangeException((startIndex >= _size) ? "startIndex" : "count", SR.ArgumentOutOfRange_BiggerThanCollection);
2571 }
2572 return Array.LastIndexOf(_items, value, startIndex, count);
2573 }

References System.Collections.ArrayList._items, System.Collections.ArrayList._size, System.SR.ArgumentOutOfRange_BiggerThanCollection, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.count, System.Collections.ArrayList.Count, System.Array.LastIndexOf(), System.startIndex, and System.value.