| BinaryWriterWrite Method (Byte, Int32, Int32) |
Writes a region of a byte array to the current stream.
Namespace: System.IOAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntaxpublic 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| Exception | Condition |
|---|
| ArgumentException | The buffer length minus index is less than count. |
| ArgumentNullException | buffer is null. |
| ArgumentOutOfRangeException | index or count is negative. |
| IOException | An I/O error occurs. |
| ObjectDisposedException | The stream is closed. |
See Also