title: How to autodetect connection of serial COM port c#
body: <p>I have application to communication with device. Device is connected through serial COM port. My app can comunicate with device.</p>
  
  <p>I need some method / event, that can scan COM ports through running app. When I'll connect device to PC - method / event will print MessageBox with message "connected", or something like that.</p>
  
  <p>I found something like this:</p>
  
  <pre><code>comPort.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
  </code></pre>
  
  <p>But it doesnt work.</p>