# AddRange

> Appends elements from a buffer to the end of this list. Increments the length by the number of appended elements.

## Definition

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

## AddRange(void\*, int)

Appends elements from a buffer to the end of this list. Increments the length by the number of appended elements.

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

### Parameters

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

### Remarks

The same as [FixedList32Bytes\<T>.AddRangeNoResize](/engine/6000.7/script-reference/unity/collections/fixedlist32bytes1/addrangenoresize.md). Included only for consistency with the other list types. If the elements exceeds the capacity, throws cref="IndexOutOfRangeException", and the list is unchanged.

## 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.
