Write(byte[], int, int)
override
public override void Write(byte[] buffer, int offset, int count)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.
Parameters
bufferbyte[]- An array of bytes. This method copies
countbytes frombufferto the current stream. offsetint- The zero-based byte offset in
bufferat which to begin copying bytes to the current stream. countint- The number of bytes to be written to the current stream.
Exceptions
System.ArgumentException- The sum of
offsetandcountis greater than the buffer length. System.ArgumentNullExceptionbufferisnull.System.ArgumentOutOfRangeExceptionoffsetorcountis negative.System.IO.IOException- An I/O error occurred, such as the specified file cannot be found.
System.NotSupportedException- The stream does not support writing.
System.ObjectDisposedExceptionSystem.IO.Stream.Writewas called after the stream was closed.
