title: Serial port communication: polling serial port vs using serial port DataReceived event
body: <p>I am just reviewing some code I wrote to communicate with the serial port in C# on CF2.0.
  I am not using DataReceived event since it's not reliable. <a href="http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.datareceived.aspx" rel="noreferrer">MSDN states that:</a></p>
  
  <blockquote>
    <p>The DataReceived event is not
    gauranteed to be raised for every byte
    received. Use the BytesToRead property
    to determine how much data is left to
    be read in the buffer.</p>
  </blockquote>
  
  <p>I poll the port with read() and have a delegate that processes the data when it is read. I also read somewhere that "polling is bad"(no explanation given).</p>
  
  <p>Any ideas why polling might be bad? aside from the usual threading cautions - I have a separate thread (background thread) that polls the port, the thread is exited after the data is read, all tested and works well.</p>