Skip to content

StreamExtensions.ReadInt16OrThrow Method ​

Definition ​

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

c#
public static Int16 ReadInt16OrThrow(this Stream stream, Endian endian = Endian.MrKWatkins.BinaryPrimitives.Endian);

View source

Parameters ​

NameTypeDescription
streamStream
endianEndianThe endianness to use.

Returns ​

Int16

The Int16 value read from the stream.