title: C# StreamReader, "ReadLine" For Custom Delimiters
body: <p>What is the best way to have the functionality of the <code>StreamReader.ReadLine()</code> method, but with custom (String) delimiters?</p>
  
  <p>I'd like to do something like:</p>
  
  <pre><code>String text;
  while((text = myStreamReader.ReadUntil("my_delim")) != null)
  {
     Console.WriteLine(text);
  }
  </code></pre>
  
  <p>I attempted to make my own using <code>Peek()</code> and <code>StringBuilder</code>, but it's too inefficient.  I'm looking for suggestions or possibly an open-source solution.</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I should have clarified this earlier...I have seen <a href="https://stackoverflow.com/questions/6655246/how-to-read-text-file-by-particular-line-separator-character/6655492#6655492">this answer</a>, however, I'd prefer not to read the entire file into memory.</p>