Method LastIndexOf
- Namespace
- GuildWars2.Collections
- Assembly
- GuildWars2.dll
LastIndexOf(T, int, int, IEqualityComparer<T>?)
Searches for the specified item and returns the zero-based index of the last occurrence within the range of elements that contains the specified number of elements and ends at the specified index.
public int LastIndexOf(T item, int index, int count, IEqualityComparer<T>? equalityComparer)
Parameters
itemTThe item to locate in the list.
indexintThe zero-based starting index of the backward search.
countintThe number of elements in the section to search.
equalityComparerIEqualityComparer<T>The equality comparer to use in the search, or
nullto use the default comparer.
Returns
- int
The zero-based index of the last occurrence of an element that matches the conditions defined by
equalityComparer, if found; otherwise, -1.