DeviceListGetSerialDeviceOrNull Method (String, String)

HIDSharp
Gets the connected serial device with the specific device path or filesystem name.

Namespace:  HidSharp
Assembly:  HidSharp (in HidSharp.dll) Version: 2.6.3
Syntax

public SerialDevice GetSerialDeviceOrNull(
	string portName,
	string serialNumber
)

Parameters

portName
Type: SystemString
The device path or filesystem name.
serialNumber
Type: SystemString
The serial number, or null to not filter by serial number.

Return Value

Type: SerialDevice
The device, or null if none was found.
See Also

Reference