Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SerialPort::NewLine Property

 

Gets or sets the value used to interpret the end of a call to the ReadLine and WriteLine methods.

Namespace:   System.IO.Ports
Assembly:  System (in System.dll)

public:
[BrowsableAttribute(false)]
property String^ NewLine {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

A value that represents the end of a line. The default is a line feed, NewLine.

Exception Condition
ArgumentException

The property value is empty.

ArgumentNullException

The property value is null.

This property determines what value (byte) defines the end of a line for the ReadLine and WriteLine methods. By default the end-of-line value is NewLine. You would change this to a different value if the particular serial device you’re working with uses a different value for the same purpose.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft