For example, with SerialPortStream library (also available in NuGet) you can open serial COM port without setting communication parameters using SerialPortStream.OpenDirect() method:namespace Vurdalakov{ using System; using RJCP.IO.Ports; class Program { static void Main(String[] args) { using (var serialPort = new SerialPortStream("COM1")) { serialPort.OpenDirect(); while (serialPort.IsOpen) { var ch = (Char)serialPort.ReadChar(); Console.Write(ch); } } } }} 这篇关于SerialPort.Open()-参数不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-30 21:48