Düzenle

Aracılığıyla paylaş


SerialPort.BytesToRead Property

Definition

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