ImmutableArray<T>.LastIndexOf Method

Definition

Overloads

LastIndexOf(T)

Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T, Int32)

Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T, Int32, Int32)

Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T, Int32, Int32, IEqualityComparer<T>)

Searches the array for the specified item; starting at the end of the array.

LastIndexOf(T)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Searches the array for the specified item; starting at the end of the array.

C#
public int LastIndexOf(T item);

Parameters

item
T

The item to search for.

Returns

The 0-based index into the array where the item was found; or -1 if it could not be found.

Applies to

.NET 10 и друге верзије
Производ Верзије
.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

LastIndexOf(T, Int32)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Searches the array for the specified item; starting at the end of the array.

C#
public int LastIndexOf(T item, int startIndex);

Parameters

item
T

The item to search for.

startIndex
Int32

The index at which to begin the search.

Returns

The 0-based index into the array where the item was found; or -1 if it could not be found.

Applies to

.NET 10 и друге верзије
Производ Верзије
.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

LastIndexOf(T, Int32, Int32)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Searches the array for the specified item; starting at the end of the array.

C#
public int LastIndexOf(T item, int startIndex, int count);

Parameters

item
T

The item to search for.

startIndex
Int32

The index at which to begin the search.

count
Int32

The number of elements to search.

Returns

The 0-based index into the array where the item was found; or -1 if it could not be found.

Applies to

.NET 10 и друге верзије
Производ Верзије
.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

LastIndexOf(T, Int32, Int32, IEqualityComparer<T>)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Searches the array for the specified item; starting at the end of the array.

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

Parameters

item
T

The item to search for.

startIndex
Int32

The index at which to begin the search.

count
Int32

The number of elements to search.

equalityComparer
IEqualityComparer<T>

The equality comparer to use in the search.

Returns

The 0-based index into the array where the item was found; or -1 if it could not be found.

Implements

Applies to

.NET 10 и друге верзије
Производ Верзије
.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