Skip to content

StreamExtensions.ReadUInt24OrThrowAsync Method ​

Definition ​

Reads a UInt24 from the stream asynchronously, throwing EndOfStreamException if the end of the stream has been reached.

c#
public static ValueTask<UInt24> ReadUInt24OrThrowAsync(this Stream stream, Endian endian = Endian.MrKWatkins.BinaryPrimitives.Endian, CancellationToken cancellationToken = null);

Parameters ​

NameTypeDescription
streamStream
endianEndianThe endianness to use.
cancellationTokenCancellationTokenA cancellation token.

Returns ​

ValueTask<UInt24>

The UInt24 value read from the stream.