# ReadArray<T>(BinaryReader, NativeArray<T>, int)

> Reads the specified number of elements from a native array.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities.Serialization](/engine/7000.0/script-reference/unity/entities/serialization.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public static void ReadArray<T>(this BinaryReader reader, NativeArray<T> elements, int count) where T : struct
```

### Parameters

**** (\[BinaryReader]\(/engine/7000.0/script-reference/unity/entities/serialization/binaryreader)): The BinaryReader to read from.**** (\[NativeArray\<T>]\(/engine/7000.0/script-reference/unity/collections/nativearray1)): The native array to read of.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements to read.
