C# – How to find available COM ports

cserial-port

How to find available COM ports in my PC? I am using framework v1.1. Is it possible to find all COM ports? If possible, help me solve the problem.

Best Answer

Framework v1.1 AFAIK doesn't allow you to do this.

In 2.0 there is a static function

SerialPort.GetPortNames()

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.getportnames.aspx