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

◆ Sort< T >() [5/5]

static void System.Array.Sort< T > ( T[] array,
int index,
int length,
IComparer< T >? comparer )
inlinestatic

Definition at line 2534 of file Array.cs.

2535 {
2536 if (array == null)
2537 {
2538 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
2539 }
2540 if (index < 0)
2541 {
2542 ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
2543 }
2544 if (length < 0)
2545 {
2546 ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
2547 }
2548 if (array.Length - index < length)
2549 {
2550 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
2551 }
2552 if (length > 1)
2553 {
2555 ArraySortHelper<T>.Default.Sort(keys, comparer);
2556 }
2557 }
static unsafe ref byte GetArrayDataReference(Array array)

References System.array, System.comparer, System.Runtime.InteropServices.MemoryMarshal.GetArrayDataReference(), System.index, System.keys, System.length, System.ThrowHelper.ThrowArgumentException(), System.ThrowHelper.ThrowArgumentNullException(), System.ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(), and System.ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum().