I have a text file which is being constantly written to by an app. That file is shared with a second app which reads/processes the data. I do the reading part using a filestream/streamreader and it all works fine.

The file will however get larger and larger over time. So I really want the second app to read the newest line(s) of data, then delete what it's just read. Since the file is shared however, I cannot delete the file and/or recreate it (since that will cause the 'writing app' to crash). Is there anyway I can delete lines from a shared file but keep it intact?