StreamExtensions.ReadUInt64OrThrowAsync Method ​
Definition ​
Reads a UInt64 from the stream asynchronously, throwing EndOfStreamException if the end of the stream has been reached.
c#
public static ValueTask<ulong> ReadUInt64OrThrowAsync(this Stream stream, Endian endian = Endian.MrKWatkins.BinaryPrimitives.Endian, CancellationToken cancellationToken = null);Parameters ​
| Name | Type | Description |
|---|---|---|
stream | Stream | |
endian | Endian | The endianness to use. |
cancellationToken | CancellationToken | A cancellation token. |
Returns ​
The UInt64 value read from the stream.