I am having trouble with Streamreader and Stream writer. I don't understand them very well. I am trying to do a simple task:
I want to read an entire file into a text box (which works well using StreaReader (sr.Readto End).

However, all I want to do is take that file and write it to a textbox one line at a time. After writing one line, I want to do some if- then stuff and then write the next line. I can easily write one line using the sr.steamline but everytime I embed an if-then statement, I get exceptions.


My goal is just to do this:

Read a file
Write one line
If "shall" is in the line then put the line in a temporary string
Go to the next line until the document is done.