Finding and Reading a specific line

Feb 8 2010 10:09 AM
Hi,

I'm in need of assitance, I've been working on what must be a simply problem for far too long and I'm just making it more complicated!!

I have a log file which I need to scan for the word "Finished" this word only appears at the beginning of a line. I have done this and stored in an array all the locations of the word Finished using Log.IndexOf("Finished") etc. This is working fine.

What I now need to do to seperate that line into a different string. so I can have CurrentLine = "Finished.... "

This is where I am now stuck. I have tried calculating line length using a FileReader but I originally read the file with a StreamReader. From here I just complicate matters. Could somebody please assist in extracting the found line into a seperate string?

Many, many thanks!

Answers (1)