Csharp/C Sharp by API/System.IO.Ports/Parity
Версия от 18:31, 26 мая 2010; (обсуждение)
Parity.None
<source lang="csharp">
using System; using System.IO.Ports; static class MainClass {
static void Main(string[] args) { using (SerialPort port = new SerialPort("COM1")) { // Set the properties. port.BaudRate = 9600; port.Parity = Parity.None; port.ReadTimeout = 10; port.StopBits = StopBits.One; // Write a message into the port. port.Open(); port.Write("Hello world!"); Console.WriteLine("Wrote to the port."); } }
}
</source>