ImmutableList<T>.LastIndexOf Method (T, Int32, Int32, IEqualityComparer<T>)

 

Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the list that contains the specified number of elements and ends at the specified index.

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public int LastIndexOf(
	T item,
	int index,
	int count,
	IEqualityComparer<T> equalityComparer
)

Parameters

item
Type: T

The object to locate in the list. The value can be null for reference types.

index
Type: System.Int32

The zero-based starting index of the backward search.

count
Type: System.Int32

The number of elements in the section to search.

equalityComparer
Type: System.Collections.Generic.IEqualityComparer<T>

The equality comparer to use in the search.

Return Value

Type: System.Int32

The zero-based index of the last occurrence of item within the range of elements in the list that contains count number of elements and ends at index, if found; otherwise, –1.

Return to top
Show: