# Add

> Appends an element to the end of this append buffer.

## Definition

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

## Add\<T>(T)

Appends an element to the end of this append buffer.

```csharp
public void Add<T>(T value) where T : unmanaged
```

### Parameters

**** (T): The value to be appended.

## Add(void\*, int)

Appends an element to the end of this append buffer.

```csharp
public void Add(void* ptr, int structSize)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): A pointer to the value to be appended.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The size in bytes of the value to be appended.

### Remarks

The value itself is stored, not the pointer.

## Add\<T>(NativeArray\<T>)

Appends all elements of an array to the end of this append buffer.

```csharp
public void Add<T>(NativeArray<T> value) where T : unmanaged
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.7/script-reference/unity/collections/nativearray1)): The array whose elements will all be appended.
