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

◆ BinarySearch() [1/3]

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

Definition at line 44 of file ArraySortHelper.cs.

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

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