The simplest way (not the most efficient, but certainly the easiest for a beginner) would be
string[] lines = File.ReadAllLines(@"F:\Temp\NamesFile.txt");
and
File.WriteAllLines(@"F:\Temp\NamesFile.txt", lines);
All you have to do is modify the lines array between the two statements!