[This is preliminary documentation and is subject to change.]

The BinaryWriter type exposes the following members.

Constructors

  NameDescription
Public methodBinaryWriter(Stream, BinaryReader..::..ByteAlign)
Initializes a new instance of the BinaryReader class based on the supplied stream and using UTF8Encoding.
Public methodBinaryWriter(Stream, Encoding, BinaryReader..::..ByteAlign)
Initializes a new instance of the BinaryReader class based on the supplied stream and a specific character encoding.

Methods

  NameDescription
Public methodClose
Closes the current BinaryWriter and the underlying stream.
(Inherited from BinaryWriter.)
Public methodDispose()()()()
Releases all resources used by the current instance of the BinaryWriter class.
(Inherited from BinaryWriter.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the BinaryWriter and optionally releases the managed resources.
(Inherited from BinaryWriter.)
Public methodFlush
Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.
(Inherited from BinaryWriter.)
Public methodSeek
Sets the position within the current stream.
(Inherited from BinaryWriter.)
Public methodWrite(Boolean)
Writes a one-byte Boolean value to the current stream, with 0 representing false and 1 representing true.
(Inherited from BinaryWriter.)
Public methodWrite(Byte)
Writes an unsigned byte to the current stream and advances the stream position by one byte.
(Inherited from BinaryWriter.)
Public methodWrite(SByte)
Writes a signed byte to the current stream and advances the stream position by one byte.
(Inherited from BinaryWriter.)
Public methodWrite(array<Byte>[]()[][])
Writes a byte array to the underlying stream.
(Inherited from BinaryWriter.)
Public methodWrite(Char)
Writes a Unicode character to the current stream and advances the current position of the stream in accordance with the Encoding used and the specific characters being written to the stream.
(Inherited from BinaryWriter.)
Public methodWrite(array<Char>[]()[][])
Writes a character array to the current stream and advances the current position of the stream in accordance with the Encoding used and the specific characters being written to the stream.
(Inherited from BinaryWriter.)
Public methodWrite(Double)
Writes an eight-byte floating-point value to the current stream and advances the stream position by eight bytes.
(Inherited from BinaryWriter.)
Public methodWrite(Decimal)
Writes a decimal value to the current stream and advances the stream position by sixteen bytes.
(Inherited from BinaryWriter.)
Public methodWrite(Single)
Writes a four-byte floating-point value to the current stream and advances the stream position by four bytes.
(Inherited from BinaryWriter.)
Public methodWrite(String)
Writes a length-prefixed string to this stream in the current encoding of the BinaryWriter, and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream.
(Inherited from BinaryWriter.)
Public methodWrite(Int16)
Writes a two-byte signed integer to the current stream and advances the stream position by two bytes.
(Overrides BinaryWriter..::..Write(Int16).)
Public methodWrite(Int32)
Writes a four-byte signed integer to the current stream and advances the stream position by four bytes.
(Overrides BinaryWriter..::..Write(Int32).)
Public methodWrite(Int64)
Writes an eight-byte signed integer to the current stream and advances the stream position by eight bytes.
(Overrides BinaryWriter..::..Write(Int64).)
Public methodWrite(UInt16)
Writes a two-byte unsigned integer to the current stream and advances the stream position by two bytes.
(Overrides BinaryWriter..::..Write(UInt16).)
Public methodWrite(UInt32)
Writes a four-byte unsigned integer to the current stream and advances the stream position by four bytes.
(Overrides BinaryWriter..::..Write(UInt32).)
Public methodWrite(UInt64)
Writes an eight-byte unsigned integer to the current stream and advances the stream position by eight bytes.
(Overrides BinaryWriter..::..Write(UInt64).)
Public methodWrite(array<Byte>[]()[][], Int32, Int32)
Writes a region of a byte array to the current stream.
(Inherited from BinaryWriter.)
Public methodWrite(array<Char>[]()[][], Int32, Int32)
Writes a section of a character array to the current stream, and advances the current position of the stream in accordance with the Encoding used and perhaps the specific characters being written to the stream.
(Inherited from BinaryWriter.)
Protected methodWrite7BitEncodedInt
Writes a 32-bit integer in a compressed format.
(Inherited from BinaryWriter.)

Extension Methods

  NameDescription
Public Extension MethodWrite(Stream)Overloaded.
Writes content of Stream to Stream
(Defined by StreamTools.)
Public Extension MethodWrite(BinaryReader)Overloaded.
Writes content of Stream to Stream
(Defined by StreamTools.)

Fields

  NameDescription
Protected fieldOutStream
Holds the underlying stream.
(Inherited from BinaryWriter.)

Properties

  NameDescription
Public propertyBaseStream
Gets the underlying stream of the BinaryWriter.
(Inherited from BinaryWriter.)
Public propertyByteOrder
Format in which numeric data are read

See Also