# InsertRangeWithBeginEnd(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 InsertRangeWithBeginEnd(int begin, int end)
```

### 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 index where the first shifted element will end up.

### 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 `end - begin`.

If `end` equals `begin`, the method does nothing.

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

The indexes `begin` up to `end` are not cleared: they will contain whatever values they held prior.
