Type Reason ArgumentNullException buffer is null. ArgumentException (index + count ) > buffer.Length. ArgumentOutOfRangeException index < 0
-or-
count < 0.
System.IO.IOException An I/O error occurred.
This method will write count characters of data into this TextWriter from the buffer character array starting at position index.
This overload is equivalent to calling the TextWriter.Write(Char[]) method followed by TextWriter.WriteLine for each character in buffer between index and (index + count).
The line terminator is defined by the TextWriter.CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.