Click or drag to resize
BinaryWriterWrite Method (Byte, Int32, Int32)
Writes a region of a byte array to the current stream.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual void Write(
	byte[] buffer,
	int index,
	int count
)

Parameters

buffer
Type: SystemByte
A byte array containing the data to write.
index
Type: SystemInt32
The starting point in buffer at which to begin writing.
count
Type: SystemInt32
The number of bytes to write.
Exceptions
ExceptionCondition
ArgumentExceptionThe buffer length minus index is less than count.
ArgumentNullExceptionbuffer is null.
ArgumentOutOfRangeExceptionindex or count is negative.
IOExceptionAn I/O error occurs.
ObjectDisposedExceptionThe stream is closed.
See Also