# Sandbox.Internal.SafeStream.ReadAsync

## Overload 1

```csharp
System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken)
```

### Parameters

- `buffer` (`byte[]`)
- `offset` (`int`)
- `count` (`int`)
- `cancellationToken` (`System.Threading.CancellationToken`)

### Returns

`System.Threading.Tasks.Task<int>`

## Overload 2

```csharp
System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = null)
```

### Parameters

- `buffer` (`System.Memory<byte>`)
- `cancellationToken` (`System.Threading.CancellationToken`), default `null`

### Returns

`System.Threading.Tasks.ValueTask<int>`

Declared in [Sandbox.Internal.SafeStream](/api/Sandbox.Internal.SafeStream).
Assembly: `Sandbox.System`.
