# GetIdForIndex(int)

> Returns the id for the specified index.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.6/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public virtual int GetIdForIndex(int index)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The item index.

### Returns

| Type                                                       | Description  |
| ---------------------------------------------------------- | ------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The item ID. |

### Remarks

For example, the index will be different from the id in a tree.
