Skip to content

StreamExtensions.WriteUInt16Async Method

Definition

Writes a UInt16 to the stream asynchronously.

public static ValueTask WriteUInt16Async(this Stream stream, ushort value, Endian endian = Endian.MrKWatkins.BinaryPrimitives.Endian, CancellationToken cancellationToken = null);

Parameters

Name Type Description
stream Stream
value UInt16 The UInt16 value to write.
endian Endian The endianness to use.
cancellationToken CancellationToken A cancellation token.

Returns

ValueTask