Writes a subarray of characters followed by a line terminator to the text stream.
[Visual Basic] Overloads Overridable Public Sub WriteLine( _ ByVal buffer() As Char, _ ByVal index As Integer, _ ByVal count As Integer _ ) [C#] public virtual void WriteLine( char[] buffer, int index, int count ); [C++] public: virtual void WriteLine( __wchar_t* buffer[], int index, int count ); [JScript] public function WriteLine( buffer : Char[], index : int, count : int );
Characters are read from buffer beginning at index and ending at index + count. All characters are written to the underlying stream unless the end of the underlying stream is reached prematurely.
Exception Type | Condition |
---|---|
ArgumentNullException | buffer is a null reference (in Visual Basic Nothing). |
ArgumentException | The buffer length minus index is less than count. |
ArgumentOutOfRangeException | index or count is negative. |
IOException | An I/O error occurs. |
TextWriter Class | TextWriter Members | System.IO Namespace | TextWriter.WriteLine Overload List