title: C# read only Serial port when data comes
body: <p>I want read my serial port but only when data comes(I want not polling).</p>
  
  <p>This is how I do it.</p>
  
  <pre><code>                Schnittstelle = new SerialPort("COM3");
                  Schnittstelle.BaudRate = 115200;
                  Schnittstelle.DataBits = 8;
                  Schnittstelle.StopBits = StopBits.Two;
               ....
  </code></pre>
  
  <p>And then I start a thread</p>
  
  <pre><code>             beginn = new Thread(readCom);
               beginn.Start();
  </code></pre>
  
  <p>and in my readCom I'm reading continuous (polling :( )</p>
  
  <pre><code>private void readCom()
      {
  
          try
          {
              while (Schnittstelle.IsOpen)
              {
  
                  Dispatcher.BeginInvoke(new Action(() =&gt;
                  {
  
                      ComWindow.txtbCom.Text = ComWindow.txtbCom.Text + Environment.NewLine + Schnittstelle.ReadExisting();
                      ComWindow.txtbCom.ScrollToEnd();
                  }));
  
                  beginn.Join(10);
  
              }
          }
          catch (ThreadAbortException) 
          {
  
          }
  
          catch (Exception ex)
          {
              System.Windows.Forms.MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
          }
      }
  </code></pre>
  
  <p>I want yout read when a Interrupt is coming. But how can I do that ?</p>