Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
An array of bytes. This method copies count bytes from buffer to the current stream.
The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
The number of bytes to be written to the current stream.
The cancellation token.
Methods were called after the stream was closed.
The stream does not support writing.
The sum of offset and count is larger than the buffer length.
buffer is null (Nothing in Visual Basic).
offset or count is negative.