Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // OrtizOL - xCSw - http://ortizol.blogspot.com
- using System;
- using System.IO.Ports;
- namespace Receta.CSharp.R0520
- {
- public class UsoGetPortNames
- {
- public static void Main()
- {
- Console.WriteLine(Environment.NewLine);
- // Obtiene la lista de los nombres de los puertos
- // seriales del equipo local:
- string[] puertos = SerialPort.GetPortNames();
- Console.WriteLine("Puertos disponibles:");
- foreach(string puerto in puertos)
- {
- Console.WriteLine("\t{0}", puerto);
- }
- Console.WriteLine(Environment.NewLine);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement