Quote:To the button's click routine I have added the following code:
private void btnGetSerialPorts_Click(object sender, EventArgs e) { string[] ArrayComPortsNames = null; int index = -1; string ComPortName = null; ArrayComPortsNames = SerialPort.GetPortNames(); do { index += 1; rtbIncoming.Text += ArrayComPortsNames[index]+"\n"; } while (!((ArrayComPortsNames[index] == ComPortName) || (index == ArrayComPortsNames.GetUpperBound(0)))); }
rtbIncoming.Text += ArrayComPortsNames[index] + "\n";
rtbIncoming.Text
rtbIncoming
ArrayComPortsNames
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)