Uredi

Deli z drugimi prek


IImmutableList<T>.LastIndexOf Method

Definition

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

public:
 int LastIndexOf(T item, int index, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int LastIndexOf (T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int LastIndexOf (T item, int index, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
abstract member LastIndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function LastIndexOf (item As T, index As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer

Parameters

item
T

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

index
Int32

The zero-based starting index of the search. 0 (zero) is valid in an empty list.

count
Int32

The number of elements in the section to search.

equalityComparer
IEqualityComparer<T>

The equality comparer to match item.

Returns

Returns Int32.

Applies to