The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
SerialPort::BytesToRead Property
.NET Framework (current version)
Gets the number of bytes of data in the receive buffer.
Assembly: System (in System.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | The port is not open. |
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: