日期:2014-05-17  浏览次数:21119 次

SerialPort sp = new SerialPort();


用完后,怎么样正确释放资源。

有时候关闭不正常,端口还被占用着,下次就打不开。








------解决方案--------------------
refer: http://msdn.microsoft.com/zh-cn/library/system.io.ports.serialport.aspx
------解决方案--------------------
调用Close方法