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.
Declaration Syntax
C# | Visual Basic | Visual C++ | J# |
public: virtual void Write( array<unsigned char>^ buffer, int offset, int count ) override
Exceptions
Exception | Condition |
---|---|
ArgumentException | The sum of offset and count is greater than the buffer length.
|
ArgumentNullException | buffer is null.
|
ArgumentOutOfRangeException | offset or count is negative.
|
IOException | An I/O error occurs.
|
NotSupportedException | The stream does not support writing.
|
ObjectDisposedException | Methods were called after the stream was closed.
|