Skip to content

Instantly share code, notes, and snippets.

@wolf99
Last active September 2, 2015 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wolf99/0cfca8a392262b729573 to your computer and use it in GitHub Desktop.
Save wolf99/0cfca8a392262b729573 to your computer and use it in GitHub Desktop.
Get a collection serial port names using VB.NET
Private Function GetSerialPortNames() As List(Of String)
Dim PortNames As New List(Of String)
For Each PortName In My.Computer.Ports.SerialPortNames
PortNames.Add(PortName)
Next
Return PortNames
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment