Writes a line terminator to the text string or stream.
TypeReasonSystem.IO.IOExceptionAn I/O error occurred.
The line terminator is defined by the TextWriter.CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.