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

◆ Sort() [3/4]

override void System.Collections.ArrayList.IListWrapper.Sort ( int index,
int count,
IComparer comparer )
inline

Definition at line 488 of file ArrayList.cs.

489 {
490 if (index < 0 || count < 0)
491 {
492 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
493 }
494 if (_list.Count - index < count)
495 {
496 throw new ArgumentException(SR.Argument_InvalidOffLen);
497 }
498 object[] array = new object[count];
499 CopyTo(index, array, 0, count);
500 Array.Sort(array, 0, count, comparer);
501 for (int i = 0; i < count; i++)
502 {
503 _list[i + index] = array[i];
504 }
505 _version++;
506 }
override void CopyTo(Array array, int index)
Definition ArrayList.cs:217

References System.Collections.ArrayList.IListWrapper._list, System.Collections.ArrayList._version, System.SR.Argument_InvalidOffLen, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, System.comparer, System.Collections.ArrayList.IListWrapper.CopyTo(), System.count, System.Collections.ICollection.Count, System.index, and System.Array.Sort().