I am reading from a file line by line and i want to edit some of the lines i read.. The lines i want to edit must have some other specific lines above or below them, but i dont know how to express that in C#. For example:
http://www.youtube.com
You Tube | Music | something
Sports
Music
Radio
Clips
http://www.youtube.com/EDIT ME
Sports
Music
Radio
Clips
and i want to edit a line only if next line is
Sports
and the previous line is
Clips
So the only line i want to edit from the example above is
http://www.youtube.com/EDIT ME
Any ideas?