title: How to check the data received event in serial port C#
body: <p>I am trying to read/write some data using serial port, </p>
  
  <pre><code>byte[] txTestData = new byte[] { 0x03, 0x0, 0x01, 0x0};
  Serial.Write(txTestData, 0, txTestData.Length);
  </code></pre>
  
  <p>But I want to read the data only when i receive data from serial port. ,i.e</p>
  
  <pre><code>if(Data received from serial port)
  {
     byte[] rxTestResponse = new byte[2];
     Serial.Read(rxTestResponse, 0, 2);
  }
  </code></pre>
  
  <p>Is there any API that tells me the data received event ??</p>
  
  <p>Thanks,
  Dattatarya</p>