VB.Net by API/System.IO.Ports/SerialPort — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 19:40, 26 мая 2010
SerialPort.WriteLine
<source lang="vbnet"> Public Class Tester
Public Shared Sub Main Dim com1Port As IO.Ports.SerialPort = Nothing Try com1Port = My.ruputer.Ports.OpenSerialPort("COM1") com1Port.WriteLine("serialData") com1Port.Write("serialData") com1Port.Close() Catch ex As Exception Console.WriteLine(ex.Message) Finally If (com1Port IsNot Nothing) Then com1Port.Dispose() com1Port = Nothing End Try End Sub
End Class
</source>