Skip to content

StreamExtensions.WriteInt16Async Method ​

Definition ​

Writes a Int16 to the stream asynchronously.

c#
public static ValueTask WriteInt16Async(this Stream stream, Int16 value, Endian endian = Endian.MrKWatkins.BinaryPrimitives.Endian, CancellationToken cancellationToken = null);

Parameters ​

NameTypeDescription
streamStream
valueInt16The Int16 value to write.
endianEndianThe endianness to use.
cancellationTokenCancellationTokenA cancellation token.

Returns ​

ValueTask