title: Read Response Until Certain Character
body: <p>I am building an application that needs to read a string response from a device and convert it into a byte array. Each string I receive finishes with a new line &amp; carriage return "\n\r". I am trying to find a way to read all of the characters until the "\n\r" is given.</p>
  
  <p>So for example if I received a response "1AF32AEF\n\r" I would only want to read "1AF32AEF" and ignore the "\n\r". I tried the <code>.ReadTo</code> method but I am not sure if that's what I need. Below is the line of code I am using to try to accomplish this.</p>
  
  <pre><code>string result = serialport.ReadTo("\n\r");
  </code></pre>
  
  <p>Any help would be appreciated.</p>