ToString more conventional

This commit is contained in:
glax 2024-02-12 02:04:09 +01:00
parent 8d70879c68
commit f6e8ddb91d

View File

@ -15,7 +15,12 @@ public readonly struct SerialPortInfo
public override string ToString()
{
return
$"{GetType().Name}\nPortName: {PortName}\nDescription: {Description}\nManufacturer: {Manufacturer}\nDeviceID: {DeviceID}\n\r";
return $"{string.Join("\n\t",
$"{GetType().Name}",
$"PortName: {PortName}",
$"Description: {Description}",
$"Manufacturer: {Manufacturer}",
$"DeviceID: {DeviceID}")}" +
$"\n\r";
}
}