cboPorts.DataSource = SerialPort.GetPortNames;
do { index += 1; cboPort.Items.Add(nameArray[index]); } while (!((nameArray[index]==myComPortName)||(index == nameArray.GetUpperBound(0))));
string[] portNames = SerialPort.GetPortNames(); if(portNames.Length == 0) // No ports found. else // Do your binding.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)