I have a C# Application with a ComboBox
where there user shall be able to select which com port he wants to use. I fill the ComboBox
with the available com ports like this:
string[] strPortsList = SerialPort.GetPortNames();
Array.Sort(strPortsList);
Combobos.ItemsSource = strPortsList;
So far this works well. I have a list of COM1, COM2, COM5 and so on. When the user selects a com port I can open it.
The problem now is that the user still needs to know which COM Port is the right one for example for the serial2USB cable. He still needs to go to the device manager and check for the name of the com port that the adapter got.
It would be wonderful if the name of the COM Port would be visible in my drop down list like "COM1 (serial2usb)", "COM2 (NMEA Port)",... Then he could choose the right port without needing the device manager. And when I check for the selected item I just want to have COM1 or COM2 or... as a result.
Is this possible in C# somehow?