Method IndexOf
- Namespace
- GuildWars2.Collections
- Assembly
- GuildWars2.dll
IndexOf(T, int, int, IEqualityComparer<T>?)
Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the IImmutableList<T> that starts at the specified index and contains the specified number of elements.
public int IndexOf(T item, int index, int count, IEqualityComparer<T>? equalityComparer)
Parameters
itemTThe object to locate in the IImmutableList<T>. This value can be null for reference types.
indexintThe zero-based starting indexes of the search. 0 (zero) is valid in an empty list.
countintThe number of elements in the section to search.
equalityComparerIEqualityComparer<T>The equality comparer to use to locate
item.
Returns
- int
The zero-based index of the first occurrence of
itemwithin the range of elements in the IImmutableList<T> that starts atindexand containscountnumber of elements if found; otherwise -1.