SerialPort.NewLine 属性

定义

获取或设置用于解释 ReadLine()WriteLine(String) 方法调用结束的值。

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

属性值

表示行尾的值。 默认为 C# vbLf 或 Visual Basic) 中的换行 (“\n”。

属性

例外

属性值为空。

属性值为 null

注解

此属性确定 (字节) 为 和 WriteLine 方法定义行ReadLine尾的值。 默认情况下,行尾值是 C# 中的换行符 (\nConstants.vbLf 在 Visual Basic) 。 如果正在使用的特定串行设备出于相同的目的使用不同的值,则可以将此值更改为其他值。

适用于