# InsertRange(int, int)

> Shifts elements toward the end of this list, increasing its length.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public void InsertRange(int index, int count)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the first element that will be shifted up.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements to insert.

### Remarks

Right-shifts elements in the list so as to create 'free' slots at the beginning or in the middle.

The length is increased by `count`. If necessary, the capacity will be increased accordingly.

If `count` equals `0`, the method does nothing.

The element at index `index` will be copied to index `index + count`, the element at index `index + 1` will be copied to `index + count + 1`, and so forth.

The indexes `index` up to `index + count` are not cleared: they will contain whatever values they held prior.
