## List::IndexOf(const T\&) const method


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

```cpp
int System::Collections::Generic::List<T>::IndexOf(const T &item) const override
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| objekt | const T\& | Objekt att söka efter. |

### ReturnValue

[Index](../../../system/index/) of first occurance of specified item or -1 if not found.

## Se även

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
## List::IndexOf(const T\&, int) const method


Söker efter ett specifikt objekt i listan.

```cpp
int System::Collections::Generic::List<T>::IndexOf(const T &item, int index) const
```


| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| objekt | const T\& | Objekt att söka efter. |
| index | int | [Index](../../../system/index/) för att börja sökningen vid. |

### ReturnValue

[Index](../../../system/index/) of first instance of specified item or -1 if not found.

## Se även

* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.PDF for C++](../../../)
