Reading Block of text file
<p>I have a text file in which a particular character repeats at the start of the line after every few lines. the no. of lines in between is not fixed. I am able to find out those lines where this condition occurs. I want to read those lines in between. </p>

<pre><code> using (StreamReader sr = new StreamReader(@"text file"))
 {
     string line;
     while ((line = sr.ReadLine()) != null)
     {
         if (line.StartsWith("some character"))
</code></pre>

<p>Because the next time, this character occurs, the code remains same. I am not able to read those lines in between</p>

<p>For eg.</p>

<pre><code>Condition at the begining of a line
Next line
Next line
Condition at the begining of a line
Next Line
Next Line
Next Line
Next Line
Condition at the begining of a line
</code></pre>

<p>I have to read lines in between. The condition remains same every time. Thanks.</p>
