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

◆ BinarySearch< T, TComparer >() [1/2]

static int System.MemoryExtensions.BinarySearch< T, TComparer > ( this ReadOnlySpan< T > span,
T value,
TComparer comparer )
inlinestatic
Type Constraints
TComparer :IComparer<T> 

Definition at line 1268 of file MemoryExtensions.cs.

1268 : IComparer<T>
1269 {
1270 if (comparer == null)
1271 {
1272 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparer);
1273 }
1274 SpanHelpers.ComparerComparable<T, TComparer> comparable = new SpanHelpers.ComparerComparable<T, TComparer>(value, comparer);
1275 return BinarySearch(span, comparable);
1276 }

References System.comparable, System.comparer, System.T, System.ThrowHelper.ThrowArgumentNullException(), and System.value.