SerialPort::BytesToWrite Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.IO.Ports
Assembly:  System (in System.dll)

public:
[BrowsableAttribute(false)]
property int BytesToWrite {
	int get();
}

Property Value

Type: System::Int32

The number of bytes of data in the send buffer.

Exception Condition
IOException

The port is in an invalid state.

InvalidOperationException

The stream is closed. This can occur because the Open method has not been called or the Close method has been called.

The send buffer includes the serial driver's send buffer as well as internal buffering in the SerialPort object itself.

.NET Framework
Available since 2.0
Return to top
Show: