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

◆ BinarySearch() [1/4]

override int System.Collections.ArrayList.Range.BinarySearch ( int index,
int count,
object value,
IComparer comparer )
inline

Definition at line 1718 of file ArrayList.cs.

1719 {
1720 if (index < 0 || count < 0)
1721 {
1722 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
1723 }
1724 if (_baseSize - index < count)
1725 {
1726 throw new ArgumentException(SR.Argument_InvalidOffLen);
1727 }
1730 if (num >= 0)
1731 {
1732 return num - _baseIndex;
1733 }
1734 return num + _baseIndex;
1735 }
virtual int BinarySearch(int index, int count, object? value, IComparer? comparer)

References System.Collections.ArrayList.Range._baseIndex, System.Collections.ArrayList.Range._baseList, System.Collections.ArrayList.Range._baseSize, System.SR.Argument_InvalidOffLen, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.Collections.ArrayList.BinarySearch(), System.comparer, System.count, System.index, System.Collections.ArrayList.Range.InternalUpdateRange(), and System.value.