title: C# check if a COM (Serial) port is already open
body: <p>Is there an easy way of programmatically checking if a serial COM port is already open/being used?</p>
  
  <p>Normally I would use:</p>
  
  <pre><code>try
  {
      // open port
  }
  catch (Exception ex)
  {
      // handle the exception
  }
  </code></pre>
  
  <p>However, I would like to programatically check so I can attempt to use another COM port or some such.</p>