---
title: "Aspose::Email::Mapi::KnownPropertyList::IndexOf method"
url: "https://reference.aspose.com/email/cpp/aspose.email.mapi/knownpropertylist/indexof/"
product: "Aspose.Email for C++"
description: "Determines the index of a specific item in the System.Collections.Generic.IList."
---


## IndexOf (1 of 2) {#indexof_1}

Determines the index of a specific item in the System.Collections.Generic.IList.

**Returns:** The index of item if found in the list; otherwise, -1.

```cpp
IndexOf(const System::SharedPtr < PropertyDescriptor > & item)
```

| Parameter | Description |
| --- | --- |
| item | The object to locate in the System.Collections.Generic.IList. |

---

## IndexOf (2 of 2) {#indexof_2}

Determines the index of a specific item in the System.Collections.Generic.IList.

**Returns:** The index of item if found in the list; otherwise, -1.

```cpp
IndexOf(const System::String & name)
```

| Parameter | Description |
| --- | --- |
| name | The name used to refer to the property. |

