Skip to content

StreamExtensions.ReadInt32OrThrow Method

Definition

Reads an Int32 from the stream, throwing EndOfStreamException if the end of the stream has been reached.

public static int ReadInt32OrThrow(this Stream stream, Endian endian = Endian.MrKWatkins.BinaryPrimitives.Endian);

View source

Parameters

Name Type Description
stream Stream
endian Endian The endianness to use.

Returns

Int32

The Int32 value read from the stream.