Hi
using system.io.ports
string[] ports = SerialPort.GetPortNames();
var sortedList = ports.OrderBy(port => Convert.ToInt32(port.Replace("COM", string.Empty)));
foreach(string port in ports)
{
DrpPort.Items.Add(port);
DrpPort.DataBind();
}
It is not displaying anything in Drop-Down , it is not going in loop.
Thanks