Type Reason ArgumentNullException buffer is null. ArgumentException buffer.Length - index < count. ArgumentOutOfRangeException index or count is negative. ObjectDisposedException The current writer is closed. NotSupportedException StreamWriter.AutoFlush is true or the System.IO.StreamWriter buffer is full, and the contents of the buffer cannot be written to the underlying fixed size stream because the System.IO.StreamWriter is at the end the stream. System.IO.IOException An I/O error occurred.
This method overrides TextWriter.Write(char).
The characters are read from buffer beginning at index and continuing through index + (count - 1). All characters are written to the underlying stream unless the end of the underlying stream is reached prematurely. StreamWriter.Flush is invoked automatically if StreamWriter.AutoFlush is true.
For a list of common I/O tasks, see Common I/O Tasks.