Mega Code Archive

 
Categories / VB.Net / Development
 

SerialPort GetPortNames Method Gets an array of serial port names for the current computer

Imports System Imports System.IO.Ports Module SerialPortExample     Sub Main()         Dim ports As String() = SerialPort.GetPortNames()         Dim port As String         For Each port In ports             Console.WriteLine(port)         Next port         Console.ReadLine()     End Sub End Module