BinaryReader Constructor (Stream, Encoding)

Initializes a new instance of the BinaryReader class based on the supplied stream and a specific character encoding.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Sub New ( _
	input As Stream, _
	encoding As Encoding _
)

Parameters

input
Type: System.IO.Stream
The input stream.
encoding
Type: System.Text.Encoding
The character encoding to use.

ExceptionCondition
ArgumentException

The stream does not support reading, or the stream is already closed.

ArgumentNullException

input or encoding is Nothing.

The stream is closed when the BinaryReader object is disposed.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft