ImmutableArray<T>.IndexOf Método
Definición
Sobrecargas
IndexOf(T) |
Busca el elemento especificado en la matriz.Searches the array for the specified item. |
IndexOf(T, Int32) |
Busca el elemento especificado en la matriz.Searches the array for the specified item. |
IndexOf(T, Int32, IEqualityComparer<T>) |
Busca el elemento especificado en la matriz.Searches the array for the specified item. |
IndexOf(T, Int32, Int32) |
Busca el elemento especificado en la matriz.Searches the array for the specified item. |
IndexOf(T, Int32, Int32, IEqualityComparer<T>) |
Busca el elemento especificado en la matriz.Searches the array for the specified item. |
IndexOf(T)
Busca el elemento especificado en la matriz.Searches the array for the specified item.
public:
virtual int IndexOf(T item);
public int IndexOf (T item);
abstract member IndexOf : 'T -> int
override this.IndexOf : 'T -> int
Public Function IndexOf (item As T) As Integer
Parámetros
- item
- T
Elemento que se va a buscar.The item to search for.
Devoluciones
Devuelve la posición de índice de base cero del elemento si se encuentra; de lo contrario, devuelve -1.The zero-based index position of the item if it is found, or -1 if it is not.
Implementaciones
Se aplica a
IndexOf(T, Int32)
Busca el elemento especificado en la matriz.Searches the array for the specified item.
public:
int IndexOf(T item, int startIndex);
public int IndexOf (T item, int startIndex);
member this.IndexOf : 'T * int -> int
Public Function IndexOf (item As T, startIndex As Integer) As Integer
Parámetros
- item
- T
Elemento que se va a buscar.The item to search for.
- startIndex
- Int32
El índice en el que se va a comenzar la búsqueda.The index at which to begin the search.
Devoluciones
Devuelve la posición de índice de base cero del elemento si se encuentra; de lo contrario, devuelve -1.The zero-based index position of the item if it is found, or -1 if it is not.
Se aplica a
IndexOf(T, Int32, IEqualityComparer<T>)
Busca el elemento especificado en la matriz.Searches the array for the specified item.
public:
int IndexOf(T item, int startIndex, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int IndexOf (T item, int startIndex, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int IndexOf (T item, int startIndex, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
member this.IndexOf : 'T * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function IndexOf (item As T, startIndex As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer
Parámetros
- item
- T
Elemento que se va a buscar.The item to search for.
- startIndex
- Int32
El índice en el que se va a comenzar la búsqueda.The index at which to begin the search.
- equalityComparer
- IEqualityComparer<T>
Comparador de igualdad que se va a usar en la búsqueda.The equality comparer to use in the search.
Devoluciones
Devuelve la posición de índice de base cero del elemento si se encuentra; de lo contrario, devuelve -1.The zero-based index position of the item if it is found, or -1 if it is not.
Se aplica a
IndexOf(T, Int32, Int32)
Busca el elemento especificado en la matriz.Searches the array for the specified item.
public:
int IndexOf(T item, int startIndex, int count);
public int IndexOf (T item, int startIndex, int count);
member this.IndexOf : 'T * int * int -> int
Public Function IndexOf (item As T, startIndex As Integer, count As Integer) As Integer
Parámetros
- item
- T
Elemento que se va a buscar.The item to search for.
- startIndex
- Int32
El índice en el que se va a comenzar la búsqueda.The index at which to begin the search.
- count
- Int32
Número de elementos que se van a buscar.The number of elements to search.
Devoluciones
Devuelve la posición de índice de base cero del elemento si se encuentra; de lo contrario, devuelve -1.The zero-based index position of the item if it is found, or -1 if it is not.
Se aplica a
IndexOf(T, Int32, Int32, IEqualityComparer<T>)
Busca el elemento especificado en la matriz.Searches the array for the specified item.
public:
virtual int IndexOf(T item, int startIndex, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int IndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int IndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
abstract member IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
override this.IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function IndexOf (item As T, startIndex As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer
Parámetros
- item
- T
Elemento que se va a buscar.The item to search for.
- startIndex
- Int32
El índice en el que se va a comenzar la búsqueda.The index at which to begin the search.
- count
- Int32
Número de elementos que se van a buscar.The number of elements to search.
- equalityComparer
- IEqualityComparer<T>
Comparador de igualdad que se va a usar en la búsqueda.The equality comparer to use in the search.
Devoluciones
Devuelve la posición de índice de base cero del elemento si se encuentra; de lo contrario, devuelve -1.The zero-based index position of the item if it is found, or -1 if it is not.