StreamExtensions.ReadAllBytesAsync Method
Definition
Reads all remaining bytes from the stream asynchronously.
public static ValueTask<Byte[]> ReadAllBytesAsync(this Stream stream, CancellationToken cancellationToken = null);
Parameters
| Name | Type | Description |
|---|---|---|
| stream | Stream | |
| cancellationToken | CancellationToken | A cancellation token. |
Returns
A byte array containing all remaining bytes from the stream.