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

◆ Sort< TKey, TValue >() [4/4]

static void System.Array.Sort< TKey, TValue > ( TKey[] keys,
TValue?[] items,
int index,
int length,
IComparer< TKey >? comparer )
inlinestatic

Definition at line 2559 of file Array.cs.

2560 {
2561 if (keys == null)
2562 {
2563 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys);
2564 }
2565 if (index < 0)
2566 {
2567 ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
2568 }
2569 if (length < 0)
2570 {
2571 ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
2572 }
2573 if (keys.Length - index < length || (items != null && index > items.Length - length))
2574 {
2575 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
2576 }
2577 if (length > 1)
2578 {
2579 if (items == null)
2580 {
2582 return;
2583 }
2587 }
2588 }
static void Sort(Array array)
Definition Array.cs:2329
static unsafe ref byte GetArrayDataReference(Array array)

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