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

◆ IndexOf() [5/5]

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

Definition at line 530 of file ImmutableArray.cs.

531 {
532 if (count == 0 && startIndex == 0)
533 {
534 return -1;
535 }
536 Requires.Range(startIndex >= 0 && startIndex < Count, "startIndex");
537 Requires.Range(count >= 0 && startIndex + count <= Count, "count");
540 {
542 }
543 for (int i = startIndex; i < startIndex + count; i++)
544 {
545 if (equalityComparer.Equals(_elements[i], item))
546 {
547 return i;
548 }
549 }
550 return -1;
551 }
int IList. IndexOf(object value)
Definition Array.cs:1228

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