# ReadBytes(BinaryReader, NativeArray<byte>, int, int)

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

## Definition

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

```csharp
public static void ReadBytes(this BinaryReader reader, NativeArray<byte> elements, int count, int offset = 0)
```

### Parameters

**** (\[BinaryReader]\(/engine/7000.0/script-reference/unity/entities/serialization/binaryreader)): The BinaryReader to read from.**** (\[NativeArray\<byte>]\(/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.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The offset at which to start reading.
