ArcGIS Pro 2.9 API Reference Guide
ComPort Property
Example 

ArcGIS.Desktop.Core.DeviceLocation Namespace > SerialPortDeviceLocationSource Class : ComPort Property
Gets and sets the COM port which the communication between ArcGIS Pro and a location device such as GPS/GNSS taken place.
Syntax
public string ComPort {get; set;}
Public Property ComPort As String
Remarks
var sp = new SerialPortDeviceLocationSource() { ComPort = "COM4", };
Example
var sp = new SerialPortDeviceLocationSource()
{
  ComPort = "COM4",
};
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

SerialPortDeviceLocationSource Class
SerialPortDeviceLocationSource Members