SerialDevice.LastIndex

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aSerialDevice.LastIndex

New in 2019r2

Supported for all project types and targets.

Returns the index of the last serial device.

Example

The following displays the names of the serial devices on the computer:

For i As Integer = 0 To SerialDevice.LastIndex
MessageBox(SerialDevice.At(i).Name)
Next