hi,
The safest aproach is to create a temp file ( using Path.GetTempPath/
Path.GetTempFileName ) and read each lie of the file, replace as needed,
write the others without change and then use File.Copy to override the
original
Just remember ot close the original before doing the copy ;)
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Philip Germanos" <Ph************@discussions.microsoft.com> wrote in
message news:5B**********************************@microsof t.com...
Hello,
I have a text file that contains 5 lines, I want to write to it: removing
the first line and replacing it with something else, while keeping the
other
lines.
Can someone tell me how it could be done?
Its a silly question but I am a new developer in C#.
Thank you.