你好,
BytesToWrite 是 获取发送缓冲区中数据的字节数, 请检查一下你的串口有没有缓冲区, 或者有没有设置缓冲区, 下面的帖子有具体的内容介绍,你可以参考一下。
https://stackoverflow.com/questions/5991598/usage-of-serialport-bytestowrite
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.