# Insert(int, T)

> Inserts an element at the specified index, resizing as necessary.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public void Insert(int index, T elem)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The position at which to insert the new element.**** (T): The element to add to the buffer.

### Remarks

The buffer is resized if it has no additional capacity.
