title: Event handler fires twice
body: <p>i am an engineering student and i am currently working on my final year project. i am trying to build a  rfid-based parking lot management system in C#. based on some research i have written the following code to read data from rfid reader but i am facing this problem. the event handler<br>
  which i use to read the received data fires twice, which i don't understand how...i did some research on  the internet and found many people are facing similar problem of an event handler firing twice but most of them are button-click events. i could only find a few threads on custom event handler but those solutions don't seem to work in my project. any possible solutions to this problem?</p>
  
  <pre><code>private void Parking_layout_Load(object sender, EventArgs e)
  {
      foreach (string port in System.IO.Ports.SerialPort.GetPortNames())
      {
          comboBox1.Items.Add(port);
          if (comboBox1.Items.Count &gt; 0)
              comboBox1.SelectedIndex = comboBox1.Items.Count - 1;
      }
  
      RFID = new SerialPort();
      RFID.PortName = comboBox1.Text;
      RFID.BaudRate = 9600;
      RFID.DataBits = 8;
      RFID.Parity = Parity.None;
      RFID.StopBits = StopBits.One;
      RFID.Open();
      RFID.DataReceived += new SerialDataReceivedEventHandler(RFID_DataReceived);
  
  }
  
  private void RFID_DataReceived(object sender, SerialDataReceivedEventArgs e)
  {            
      try
      {                
          tag_id = RFID.ReadExisting().ToString();              
          SetLabel(tag_id);                
      }
      catch (Exception ex)
      {
          throw new Exception(ex.Message);
      }
  }
  </code></pre>
  
  <p>the RFID_DataReceived executes twice. if i put a messageBox.show() statement to test it, it shows the message twice. how do i fix this problem?</p>