C# SerialPort#Open() method throws ArgumentException because of port name?
问题 On my local machine, Windows XP Ports (COM & LPT) COM3 RIM Virtual Serial Port v2 (COM4) RIM Virtual Serial Port v2 (COM5) the following code, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO.Ports; using System.Threading; namespace OpenSerialPortTest { class Test { static void Main(string[] args) { foreach (String serialPortName in SerialPort.GetPortNames()) { SerialPort serialPort = new SerialPort(serialPortName); try { serialPort.Open();