Option Strict On Imports System.Collections.ObjectModel Public Module PortsTest Public Sub Main() Dim ports As ReadOnlyCollection(Of String) = _ My.Computer.Ports.SerialPortNames For Each port As String In ports Console.WriteLine(port) Next End Sub End Module