SerialPort.GetPortNames Method Gets an array of serial port names for the current computer. : SerialPort « Development « VB.Net






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

   
  








Related examples in the same category

1.SerialPort Class Represents a serial port resource.
2.Available Ports
3.Available Parity options
4.Available Stop Bits options
5.Available Handshake options
6.SerialPort.DataReceived Event