C# adding lines from a text file to a listbox
<p>I have a text file that contains lines of text, I am trying to add certain line to a listbox if the next line meet the a condition for example</p>

<p>if the line starts with a # then add that line if the next line starts with a @ and all line after that that start with a @</p>

<pre><code>#add this line
@add this line
@add this line
@add this line
#dont add because the next line is not a @
#dont add because the next line is not a @
#dont add because the next line is not a @
#dont add because the next line is not a @
#add this line
@add this line
@add this line
#dont add because the next line is not a @
#add this line
@add this line  
#add this line
@add this line
</code></pre>

<p>hope this makes scene any help would be great</p>
