System::Collections::Generic::List::IndexOf método

List::IndexOf(const T&) const method

Obtiene el primer índice del elemento específico.

int System::Collections::Generic::List<T>::IndexOf(const T &item) const override
ParámetroTipoDescripción
elementoconst T&Elemento a buscar.

ReturnValue

Index of first occurance of specified item or -1 if not found.

Ver también

List::IndexOf(const T&, int) const method

Busca un elemento específico en la lista.

int System::Collections::Generic::List<T>::IndexOf(const T &item, int index) const
ParámetroTipoDescripción
elementoconst T&Elemento a buscar.
indexintIndex para iniciar la búsqueda en.

ReturnValue

Index of first instance of specified item or -1 if not found.

Ver también