C # Identificare la porta seriale disponibile sul PC (it-IT)

C # Identificare la porta seriale disponibile sul PC (it-IT)

Mediante questo esempio e possibile ottenere la porta seriale disponibuile sul pc , si esegue il controllo sull proprietà GetPortNames dela Classe SerialPort che restituisce tutte le porte disponibili e attualmente collegatre e attive.

Sample code C#.

private void BtnFindSerialPort_Click(object sender, EventArgs e) 

     foreach (string ports in System.IO.Ports.SerialPort.GetPortNames()) 
     { 
         MessageBox.Show("Serial port avialible" + " " + ports); 
     } 
}
Leave a Comment
  • Please add 6 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Wikis - Comment List