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

◆ LastIndexOf() [4/4]

int System.Collections.Immutable.ImmutableArray< T >.Builder.LastIndexOf ( T item,
int startIndex,
int count,
IEqualityComparer< T >? equalityComparer )
inline

Definition at line 577 of file ImmutableArray.cs.

578 {
579 if (count == 0 && startIndex == 0)
580 {
581 return -1;
582 }
583 Requires.Range(startIndex >= 0 && startIndex < Count, "startIndex");
584 Requires.Range(count >= 0 && startIndex - count + 1 >= 0, "count");
587 {
589 }
590 for (int num = startIndex; num >= startIndex - count + 1; num--)
591 {
592 if (equalityComparer.Equals(item, _elements[num]))
593 {
594 return num;
595 }
596 }
597 return -1;
598 }
static int LastIndexOf(Array array, object? value)
Definition Array.cs:1995

References System.Collections.Immutable.ImmutableArray< T >.Builder._elements, System.Collections.Immutable.ImmutableArray< T >.Builder.Count, System.count, System.Default, System.item, System.Array.LastIndexOf(), System.Collections.Immutable.Requires.Range(), and System.startIndex.