base {System.Windows.Forms.TextBoxBase} = {Text = 由于以前的函数求值超时,函数求值被禁用。必须继续执行才能重新启用函数求值。}
例子来源于:
http://hi.baidu.com/%C4%CF%B9%AC%B3%FE%BA%AE/blog/item/c203d8350016de0891ef3922.html
例子来源于:
http://hi.baidu.com/%C4%CF%B9%AC%B3%FE%BA%AE/blog/item/c203d8350016de0891ef3922.html
private void AsyReceiveData(object serialPortobj)
{
SerialPort serialPort = (SerialPort)serialPortobj;
System.Threading.Thread.Sleep(500);
try
{
txtReceive.Text = serialPort.ReadExisting();
}
catch (Exception e)
{
MessageBox.Show(e.Message);
//处理错误
}
serialPort.Close();
}