When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
Namespace:
Contracts
Assembly: Contracts (in Contracts.dll)
Assembly: Contracts (in Contracts.dll)
Exception type | Condition |
---|---|
Write was called after the stream was closed. |
|
buffer is null reference (Nothing in Visual Basic). |
|
offset or count is negative. |
|
An I/O error occured, such as the specified file cannot be found. |
|
The stream does not support writing. |
|
The sum of offset and count is greater than the buffer length. |