How to find available COM ports?

RV. picture RV. · Jul 4, 2009 · Viewed 46.9k times · Source

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.

Answer

Vanuan picture Vanuan · Jul 4, 2009

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