This topic has not yet been rated - Rate this topic

BinaryWriter Constructor (Stream, Encoding)

May 02, 2013

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

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)
public BinaryWriter(
	Stream output,
	Encoding encoding
)

Parameters

output
Type: System.IO.Stream
The output stream.
encoding
Type: System.Text.Encoding
The character encoding to use.
ExceptionCondition
ArgumentException

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

ArgumentNullException

output or encoding is null.

The stream is closed when the BinaryWriter object is disposed.

Windows Phone OS

Supported in: 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.