Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BinaryReader Constructor (Stream, Encoding)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

public BinaryReader(
	Stream input,
	Encoding 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 null.

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: