<div class="meta" robots="noindex">

</div>

Property

# System.SerialPortCount

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `SerialDevice.Count<serialdevice.count>` as a replacement.

</div>

## Description

Returns the number of serial ports available.

## Sample code

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

``` xojo
For i As Integer = 0 To System.SerialPortCount - 1
  MsgBox(System.SerialPort(i).Name)
Next
```

## Compatibility

All project types on all supported operating systems.
