c#读取串口发送缓冲区的字节数BytesToWrite,为什么一直为0

[复制链接]
查看11 | 回复1 | 2008-12-20 16:21:48 | 显示全部楼层 |阅读模式
想在串口发送完数据开始计时。
使用BytesToWrite 有什么特殊要求么?
对象浏览器中说public int BytesToWrite { get ; }
为什么编译适合要求public int BytesToWrite{get;set}??
在线等候!!知道怎么用的告诉一下
我要的是BytesToWrite=0的时候,开始计时,
不是去获取BytesToRead

回复

使用道具 举报

千问 | 2008-12-20 16:21:48 | 显示全部楼层
this.serialPort.PortName = "COM1";//端口号
this.serialPort.DataBits = 8;//数据位
this.serialPort.StopBits = StopBits.One;//停止位
this.serialPort.Parity = Parity.None;//校验位
this.serialPort.BaudRate = 9600;//波特率57600
//this.serialPort.ReadTimeout = 60 * 6...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行