Прочетете на английски Редактиране

Споделяне чрез


IImmutableList<T>.LastIndexOf Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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.

C#
public int LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
C#
public int LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);

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

Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0