BinaryWriter Constructor (Stream)
Collapse the table of content
Expand the table of content

BinaryWriter Constructor (Stream)

[ 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 BinaryWriter class based on the supplied stream and using UTF-8 as the encoding for strings.

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

public BinaryWriter(
	Stream output
)

Parameters

output
Type: System.IO.Stream
The output stream.

ExceptionCondition
ArgumentException

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

ArgumentNullException

output is null.

The stream is closed when the BinaryWriter object is disposed.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft