標題:
[C#]
C#範例搜尋與部分筆記
[打印本頁]
作者:
gswdkimo
時間:
2010-11-24 08:50
標題:
C#範例搜尋與部分筆記
範例搜尋
SerialPort用法
:
SerialPort inPort = new SerialPort("COM1",9600); //宣告物件(產生物件)
------------------------------------------------------------------------
inPort.Open(); //啟動
------------------------------------------------------------------------
string SerialPort.ReadLine(); //讀取資料
------------------------------------------------------------------------
string m="Hello";
inPort.WriteLine(m); //將字串送出去
------------------------------------------------------------------------
inPort.Close(); //關閉
歡迎光臨 資訊家電班NO7 (http://imce07.freehostia.com/forums/)
Powered by Discuz! 7.2