Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get a list of serial port names.
- string[] ports = SerialPort.GetPortNames();
- Console.WriteLine("The following serial ports were found:");
- // Display each port name to the console.
- foreach(string port in ports)
- {
- Console.WriteLine(port);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement