EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

BinaryWriter Constructor (Stream, Encoding, Boolean)

July 28, 2014

Initializes a new instance of the BinaryWriter class based on the supplied stream, a specific character encoding, and a value that specifies whether to leave the stream open.

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

public BinaryWriter(
	Stream output,
	Encoding encoding,
	bool leaveOpen
)

Parameters

output
Type: System.IO.Stream
The output stream.
encoding
Type: System.Text.Encoding
The character encoding to use.
leaveOpen
Type: System.Boolean
true to leave the stream open; otherwise, false.

ExceptionCondition
ArgumentException

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

ArgumentNullException

output or encoding is null.

When leaveOpen is true, the stream is left open after the BinaryWriter object is disposed.

Windows Phone OS

Supported in: 8.1, 8.0

Anzeigen:
© 2014 Microsoft