ImmutableList<T>.Builder.LastIndexOf Método
Definição
Sobrecargas
| LastIndexOf(T) |
Pesquisa o objeto especificado e retorna o índice baseado em zero da última ocorrência dentro de toda a lista imutável.Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list. |
| LastIndexOf(T, Int32) |
Procura o objeto especificado e retorna o índice baseado em zero da última ocorrência dentro do intervalo de elementos na lista imutável que se estende do primeiro elemento ao índice especificado.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, Int32, Int32) |
Pesquisa o objeto especificado e retorna o índice baseado em zero da última ocorrência no intervalo de elementos na lista imutável que contém o número de elementos especificado e termina no índice especificado.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, IEqualityComparer<T>) |
Pesquisa o objeto especificado e retorna o índice baseado em zero da última ocorrência no intervalo de elementos na lista imutável que contém o número de elementos especificado e termina no índice especificado.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)
Pesquisa o objeto especificado e retorna o índice baseado em zero da última ocorrência dentro de toda a lista imutável.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
Parâmetros
- item
- T
O objeto a ser localizado na lista imutável.The object to locate in the immutable list. O valor pode ser null para tipos de referência.The value can be null for reference types.
Retornos
O índice baseado em zero da última ocorrência de item em toda a lista imutável, se encontrado; caso contrário, -1.The zero-based index of the last occurrence of item within the entire immutable list, if found; otherwise, -1.
Aplica-se a
LastIndexOf(T, Int32)
Procura o objeto especificado e retorna o índice baseado em zero da última ocorrência dentro do intervalo de elementos na lista imutável que se estende do primeiro elemento ao índice especificado.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
Parâmetros
- item
- T
O objeto a ser localizado na lista imutável.The object to locate in the immutable list. O valor pode ser null para tipos de referência.The value can be null for reference types.
- startIndex
- Int32
O índice inicial com base em zero da pesquisa inversa.The zero-based starting index of the backward search.
Retornos
O índice baseado em zero da última ocorrência de item dentro do intervalo de elementos na lista imutável que se estende do primeiro elemento até index, se encontrado; caso contrário, -1.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.
Aplica-se a
LastIndexOf(T, Int32, Int32)
Pesquisa o objeto especificado e retorna o índice baseado em zero da última ocorrência no intervalo de elementos na lista imutável que contém o número de elementos especificado e termina no índice especificado.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
Parâmetros
- item
- T
O objeto a ser localizado na lista imutável.The object to locate in the immutable list. O valor pode ser null para tipos de referência.The value can be null for reference types.
- startIndex
- Int32
O índice inicial com base em zero da pesquisa inversa.The zero-based starting index of the backward search.
- count
- Int32
O número de elementos na seção a ser pesquisada.The number of elements in the section to search.
Retornos
O índice baseado em zero da última ocorrência de item dentro do intervalo de elementos na lista imutável que contém a count de número de elementos e termina no index, se encontrado; caso contrário, -1.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.
Aplica-se a
LastIndexOf(T, Int32, Int32, IEqualityComparer<T>)
Pesquisa o objeto especificado e retorna o índice baseado em zero da última ocorrência no intervalo de elementos na lista imutável que contém o número de elementos especificado e termina no índice especificado.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
Parâmetros
- item
- T
O objeto a ser localizado na lista imutável.The object to locate in the immutable list. O valor pode ser null para tipos de referência.The value can be null for reference types.
- startIndex
- Int32
O índice inicial com base em zero da pesquisa.The zero-based starting index of the search. 0 (zero) é válido em uma lista vazia.0 (zero) is valid in an empty list.
- count
- Int32
O número de elementos a serem pesquisados.The number of elements to search.
- equalityComparer
- IEqualityComparer<T>
O comparador de valor a ser usado para comparar a igualdade de elementos.The value comparer to use for comparing elements for equality.
Retornos
O índice baseado em zero da primeira ocorrência do item no intervalo de elementos na lista imutável que começa em index e contém a count de número de elementos, se encontrado; caso contrário, -1The 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