Writes the specified string and the NewLine value to the output buffer.
member WriteLine :
text:string -> unit
The string to write to the output buffer.
The str parameter is a null reference (Nothing in Visual Basic).
The specified port is not open.
The WriteLine method could not write to the stream.
If there are too many bytes in the input buffer and Handshake is set to XOnXOff then the SerialPort object may raise a TimeoutException while it waits for the device to be ready to accept more data.
The written output includes the NewLine string.
The following code example demonstrates the use of the SerialPort class to allow two users to chat from two separate computers connected by a null modem cable. This code example is part of a larger code example provided for the SerialPort class.