title: C# serial input - formatting
body: <p>I'm using C# and the serial port to collect data from a GSM module. 
  For this I connect to the GSM unit and send AT commands to retrieve any SMS that are present.</p>
  
  <p>I believe I have connected successfully, I believe my issue is with the format of the return data - as seen below this consists of multiple CR's and LF's -- so far I have tried:</p>
  
  <pre><code>                serialPort.WriteLine("AT+CMGL=\"ALL\"");
                  System.Threading.Thread.Sleep(500);
  
                  while (true)
                  {
                      Telemetry += serialPort.ReadLine();
                      System.Diagnostics.Debug.WriteLine(Telemetry);
                  }
                  //bool ReadTelemetry = true;
                  //while( ReadTelemetry )
                  //{
                  //    Telemetry = serialPort.ReadExisting();
                  //    if (Telemetry.Contains("OK"))
                  //        ReadTelemetry = false;
                  //} 
  </code></pre>
  
  <p>Though unsure I think the problem is the method of reading data; ReadLine or ReadExisting.
  What can be done to read this format into an array? </p>
  
  <p><img src="https://i.stack.imgur.com/jjNpe.png" alt="enter image description here"></p>