# ReaderInput.TryReadBytes(int, ReadOnlySpan&lt;byte&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.readerinput/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.readerinput/methods/)

```csharp
public abstract bool TryReadBytes(int length, out ReadOnlySpan<byte> bytes)
```

Tries to read the specified number of bytes from the input.

### Parameters

- `length` (`int`): The number of bytes to read..
- `bytes` (`ReadOnlySpan<byte>`): The bytes which were read..

### Returns

`true` if the number of bytes were successfully read, `false` otherwise.
