Επεξεργασία

Κοινή χρήση μέσω


SerialPort.NewLine Property

Definition

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

public:
 property System::String ^ NewLine { System::String ^ get(); void set(System::String ^ value); };
public string NewLine { get; set; }
[System.ComponentModel.Browsable(false)]
public string NewLine { get; set; }
member this.NewLine : string with get, set
[<System.ComponentModel.Browsable(false)>]
member this.NewLine : string with get, set
Public Property NewLine As String

Property Value

A value that represents the end of a line. The default is a line feed ("\n" in C# or vbLf in Visual Basic).

Attributes

Exceptions

The property value is empty.

The property value is null.

Remarks

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 a line feed character (\n in C#, Constants.vbLf in Visual Basic). 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.

Applies to