# ReadArrayElementBoundsChecked<T>(void*, int, int)

> Reads an element from a buffer after bounds checking.

## Definition

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

```csharp
public static T ReadArrayElementBoundsChecked<T>(void* source, int index, int capacity) where T : unmanaged
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The buffer to read from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the element.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The buffer capacity (in number of elements). Used for the bounds checking.

### Returns

| Type | Description                       |
| ---- | --------------------------------- |
| T    | The element read from the buffer. |
