System.IO.Ports.SerialPort.BytesToRead Property

Gets the number of bytes of data in the receive buffer.

Syntax

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int BytesToRead { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The receive buffer includes the serial driver's receive buffer as well as internal buffering in the System.IO.Ports.SerialPort object itself.

Because the SerialPort.BytesToRead property represents both the System.IO.Ports.SerialPort buffer and the Windows-created buffer, it can return a greater value than the SerialPort.ReadBufferSize property, which represents only the Windows-created buffer.

Requirements

Namespace: System.IO.Ports
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0