SerialPort.BytesToRead Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the number of bytes of data in the receive buffer.
public:
property int BytesToRead { int get(); };
public int BytesToRead { get; }
[System.ComponentModel.Browsable(false)]
public int BytesToRead { get; }
member this.BytesToRead : int
[<System.ComponentModel.Browsable(false)>]
member this.BytesToRead : int
Public ReadOnly Property BytesToRead As Integer
Property Value
The number of bytes of data in the receive buffer.
- Attributes
Exceptions
The port is not open.
Remarks
The receive buffer includes the serial driver's receive buffer as well as internal buffering in the SerialPort object itself.
Because the BytesToRead property represents both the SerialPort buffer and the Windows-created buffer, it can return a greater value than the ReadBufferSize property, which represents only the Windows-created buffer.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應