Método System::Array::IndexOf

Array::IndexOf(const T&) const method

Determina el índice de la primera aparición del elemento especificado en la matriz.

virtual int System::Array<T>::IndexOf(const T &item) const override
ParámetroTipoDescripción
elementoconst T&Índice del elemento que se debe determinar

ReturnValue

Index of the first occurrence of the specified item if the item is found, otherwise -1

Ver también

Array::IndexOf(const ArrayPtr<ArrayType>&, const ValueType&) method

Determina el índice de la primera aparición del elemento especificado en la matriz.

template<typename ArrayType,typename ValueType> static int System::Array<T>::IndexOf(const ArrayPtr<ArrayType> &arr, const ValueType &value)
ParámetroDescripción
ArrayTypeTipo de elementos en el arreglo objetivo
ValueTypetipo del elemento a buscar en el array
ParámetroTipoDescripción
arrconst ArrayPtr<ArrayType>&Array para buscar el elemento especificado en
valorconst ValueType&Índice del elemento que se debe determinar

ReturnValue

Index of the first occurrence specified item if the item is found, otherwise -1

Ver también

Array::IndexOf(const ArrayPtr<ArrayType>&, const ValueType&, int) method

Determina el índice de la primera aparición del elemento especificado en la matriz a partir del índice especificado.

template<typename ArrayType,typename ValueType> static int System::Array<T>::IndexOf(const ArrayPtr<ArrayType> &arr, const ValueType &value, int startIndex)
ParámetroDescripción
ArrayTypeTipo de elementos en el arreglo objetivo
ValueTypetipo del elemento a buscar en el array
ParámetroTipoDescripción
arrconst ArrayPtr<ArrayType>&Array para buscar el elemento especificado en
valorconst ValueType&Índice del elemento que se debe determinar
startIndexintIndex en el que se inicia la búsqueda

ReturnValue

Index of the first occurrence of the specified item if the item is found, otherwise -1

Ver también

Array::IndexOf(const ArrayPtr<ArrayType>&, const ValueType&, int, int) method

Determina el índice de la primera aparición del elemento especificado en un rango de elementos de la matriz especificado por el índice de inicio y el número de elementos en el rango.

template<typename ArrayType,typename ValueType> static int System::Array<T>::IndexOf(const ArrayPtr<ArrayType> &arr, const ValueType &value, int startIndex, int count)
ParámetroDescripción
ArrayTypeTipo de elementos en el arreglo objetivo
ValueTypetipo del elemento a buscar en el array
ParámetroTipoDescripción
arrconst ArrayPtr<ArrayType>&Array para buscar el elemento especificado en
valorconst ValueType&Índice del elemento que se debe determinar
startIndexintIndex en el que se inicia la búsqueda
countintNúmero de elementos del rango en el que buscar

ReturnValue

Index of the first occurrence of the specified item if the item is found, otherwise -1

Ver también