标签:style blog http color io ar for 2014 div
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.IO.Ports;
6
7 namespace SerialPortExample1
8 {
9 class Program
10 {
11 static void Main(string[] args)
12 {
13 // Get a list of serial port names.
14 string[] ports = SerialPort.GetPortNames();
15
16 Console.WriteLine("The following serial ports were found:");
17
18 // Display each port name to the console.
19 foreach (string port in ports)
20 {
21 Console.WriteLine(port);
22 }
23
24 Console.ReadLine();
25
26 }
27 }
28 }
---恢复内容结束---
标签:style blog http color io ar for 2014 div
原文地址:http://www.cnblogs.com/dingwei/p/3972605.html