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

◆ BinarySearch() [2/4]

int System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.BinarySearch ( T[] array,
int index,
int length,
T value,
IComparer< T > comparer )
inline

Definition at line 46 of file GenericArraySortHelper.cs.

47 {
48 try
49 {
50 if (comparer == null || comparer == Comparer<T>.Default)
51 {
53 }
54 return ArraySortHelper<T>.InternalBinarySearch(array, index, length, value, comparer);
55 }
56 catch (Exception e)
57 {
58 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_IComparerFailed, e);
59 return 0;
60 }
61 }
int BinarySearch(T[] array, int index, int length, T value, IComparer< T > comparer)

References System.array, System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.BinarySearch(), System.comparer, System.Default, System.index, System.length, System.ThrowHelper.ThrowInvalidOperationException(), and System.value.

Referenced by System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.BinarySearch().