# AddRange

> Copies the elements of a buffer to the end of this list.

## Definition

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

## AddRange(void\*, int)

Copies the elements of a buffer to the end of this list.

```csharp
public void AddRange(void* ptr, int count)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The buffer to copy from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements to copy from the buffer.

### Remarks

Increments the length by `count`. Increases the capacity if necessary.

## AddRange(ReadOnlySpan\<T>)

Copies elements from a ReadOnlySpan to the end of this list.

```csharp
public void AddRange(ReadOnlySpan<T> roSpan)
```

### Parameters

**** (\[ReadOnlySpan\<T>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): ReadOnlySpan to copy from.

## AddRange(UnsafeList\<T>)

Copies the elements of another container to the end of the list.

```csharp
public void AddRange(UnsafeList<T> container)
```

### Parameters

**** (\[UnsafeList\<T>]\(/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafelist1)): The container to copy from.

### Remarks

The length is increased by the length of the other container. Increases the capacity if necessary.
