System::Collections::Generic::List::IndexOf metod

List::IndexOf(const T&) const method

Hämtar första indexet för ett specifikt objekt.

int System::Collections::Generic::List<T>::IndexOf(const T &item) const override
ParameterTypBeskrivning
objektconst T&Objekt att söka efter.

ReturnValue

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

Se även

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

Söker efter ett specifikt objekt i listan.

int System::Collections::Generic::List<T>::IndexOf(const T &item, int index) const
ParameterTypBeskrivning
objektconst T&Objekt att söka efter.
indexintIndex för att börja sökningen vid.

ReturnValue

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

Se även