Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. // Get a list of serial port names.
  2. string[] ports = SerialPort.GetPortNames();
  3.  
  4. Console.WriteLine("The following serial ports were found:");
  5.  
  6. // Display each port name to the console.
  7. foreach(string port in ports)
  8. {
  9. Console.WriteLine(port);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement