deleting from a text file

allyrnn

Member
Joined
Nov 22, 2004
Messages
5
Programming Experience
1-3
I have a text file that will need to have text deleted from it. Anyone know how to do this?
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
What I would do is to read the whole file into a string, modify the string, then rewrite the file.

Use the System.IO.TextReader and System.IO.TextWriter to read and write the files.
 
Top Bottom