title: Serial port data is coming duplicated or resent (some chars)
body: <p>Let me explain the scenario: serial port that bring me data (string) as the following example:</p>
  
  <p>02051014 0009       M      0  741             30041105 2632           0    30041105</p>
  
  <p>I have tried all kinds of read (read, read byte, read char, read line, read existing). I tried to change the <a href="https://stackoverflow.com/questions/4345331/c-sharp-serialport-datareceived-problem-when-when-attached-strings">new line</a> but the data keeps duplicated. Look to the example above, and now look how data is coming:</p>
  
  <p>0220510114 00009       M      0  741             300441105 2632           0    300411055</p>
  
  <p>Anyone have any idea of how can I solve this problem?</p>
  
  <p>The code:</p>
  
  <pre><code>[...]
  try
  {
      this.serialPort = new SerialPort("COM1", 2400, Parity.None, 7, StopBits.One);
      this.serialPort.DataReceived += new SerialDataReceivedEventHandler(portaSerial_DataReceived);
      this.serialPort.Handshake = Handshake.XOnXOff;
      this.serialPort.Encoding = Encoding.ASCII;
      this.serialPort.Open();
  }
  [...]
  private void portaSerial_DataReceived(object sender, SerialDataReceivedEventArgs e)
  {
      try
      {
          var invalidValuesToBreakLine = new int[] { 13, 10, 0 };
          int data;
  
          while (this.serialPort.BytesToRead &gt; 0)
          {
              data = this.serialPort.ReadChar();
  
              if (invalidValuesToBreakLine.Contains(data))
              {
                  if (!this.breakLineWasPerformed)
                  {
                      this.breakLineWasPerformed = true;
  
                      this.dataList.Add(this.temporaryString);
  
                      this.temporaryString = string.Empty;
                  }
              }
              else
              {
                  if (this.breakLineWasPerformed)
                  {
                      this.breakLineWasPerformed = false;
                  }
  
                  this.temporaryString += (char)data;
              }
          }
  [...]
  </code></pre>