Using System. IO. Ports;
String [] ports=SerialPort. GetPortNames ();
Console. WriteLine (" the following serial ports have been found: ");
//show all serial
The foreach (string port in ports)
{
Console. WriteLine (port);
}
Console.ReadLine();
CodePudding user response:
Your notebook which to serial ports, desktop computers, notebooks are not now provide COM, even reduced to about two desktops,CodePudding user response:
What to test code, to yourself to buy a set of usbtocom adapter, or change a desktop!CodePudding user response: