[c#] How to find which serial port is currently used?
- by Pandiya Chendur
I ve connected my mobile phone to my PC and used this,
string[] lPorts = System.IO.Ports.SerialPort.GetPortNames();
and the result was an array of port names
"COM4"
"COM3"
"COM1"
"COM7"
"COM6"
Now,How to find which serial port is currently used/to which port my mobile phone is connected in c#?