ImmutableList<T>.Builder.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.
Overloads
LastIndexOf(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 immutable list that contains the specified number of elements and ends at the specified index. |
LastIndexOf(T, Int32, Int32) |
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index. |
LastIndexOf(T, Int32) |
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index. |
LastIndexOf(T) |
Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. |
LastIndexOf(T, Int32, Int32, IEqualityComparer<T>)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index.
public:
int LastIndexOf(T item, int startIndex, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int LastIndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int LastIndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
member this.LastIndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function LastIndexOf (item As T, startIndex As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer
Parameters
- item
- T
The object to locate in the immutable list. The value can be null
for reference types.
- startIndex
- Int32
The zero-based starting index of the search. 0 (zero) is valid in an empty list.
- count
- Int32
The number of elements to search.
- equalityComparer
- IEqualityComparer<T>
The value comparer to use for comparing elements for equality.
Returns
The zero-based index of the first occurrence of item within the range of elements in the immutable list that starts at index
and contains count
number of elements, if found; otherwise, -1
Applies to
LastIndexOf(T, Int32, Int32)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that contains the specified number of elements and ends at the specified index.
public:
int LastIndexOf(T item, int startIndex, int count);
public int LastIndexOf (T item, int startIndex, int count);
member this.LastIndexOf : 'T * int * int -> int
Public Function LastIndexOf (item As T, startIndex As Integer, count As Integer) As Integer
Parameters
- item
- T
The object to locate in the immutable list. The value can be null
for reference types.
- startIndex
- Int32
The zero-based starting index of the backward search.
- count
- Int32
The number of elements in the section to search.
Returns
The zero-based index of the last occurrence of item
within the range of elements in the immutable list that contains count
number of elements and ends at index
, if found; otherwise, -1.
Applies to
LastIndexOf(T, Int32)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.
public:
int LastIndexOf(T item, int startIndex);
public int LastIndexOf (T item, int startIndex);
member this.LastIndexOf : 'T * int -> int
Public Function LastIndexOf (item As T, startIndex As Integer) As Integer
Parameters
- item
- T
The object to locate in the immutable list. The value can be null
for reference types.
- startIndex
- Int32
The zero-based starting index of the backward search.
Returns
The zero-based index of the last occurrence of item
within the range of elements in the immutable list that extends from the first element to index
, if found; otherwise, -1.
Applies to
LastIndexOf(T)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list.
public:
int LastIndexOf(T item);
public int LastIndexOf (T item);
member this.LastIndexOf : 'T -> int
Public Function LastIndexOf (item As T) As Integer
Parameters
- item
- T
The object to locate in the immutable list. The value can be null
for reference types.
Returns
The zero-based index of the last occurrence of item
within the entire immutable list, if found; otherwise, -1.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor