SerialPort.DtrEnable 屬性

定義

取得或設定值,在序列通訊期間啟用 Data Terminal Ready (DTR) 信號。

public:
 property bool DtrEnable { bool get(); void set(bool value); };
public bool DtrEnable { get; set; }
[System.ComponentModel.Browsable(true)]
public bool DtrEnable { get; set; }
member this.DtrEnable : bool with get, set
[<System.ComponentModel.Browsable(true)>]
member this.DtrEnable : bool with get, set
Public Property DtrEnable As Boolean

屬性值

Boolean

true 表示啟用 Data Terminal Ready (DTR),否則為 false。 預設為 false

屬性

例外狀況

連接埠處於無效狀態。

-或- 嘗試設定基礎連接埠的狀態失敗。 例如,從這個 SerialPort 物件傳遞而來的參數無效。

備註

資料終端機就緒 (DTR) 通常會在 XON/XOFF 軟體交握期間啟用,並要求傳送/清除傳送 (RTS/CTS) 硬體交握和數據機通訊。

適用於