Thanks so far.
Some Facts about my application:
The file xy.txt look like:
Bla blabla blablabla
I basically use the Split function to read through the txt
string txt = "Bla blabla blablabla";
string[] word = text.Split(default(Char[]), StringSplitOptions.RemoveEmptyEntries);
Now I go through the Array an search for certain text like
blabla if the line contains this text I want to delete it
so far so good.
My idea is to fill all lines which not contain this text in a list and after the Streamreader is finished I want to rewrite the file with the Content of the list.
What do you think of it ?