Hi all,
I'm making a function that is supposed to delete a line from a textfile "test.txt".
I'm having no problems with finding what line i want to delete. The basic idea is this:
My problem is the last, how can i completely remove the file content, and write
another string in it, writer.writeline just appends a line.
Hannes
I'm making a function that is supposed to delete a line from a textfile "test.txt".
I'm having no problems with finding what line i want to delete. The basic idea is this:
- read the whole file with streamreader
- delete the line
- rewrite the file with streamwriter
My problem is the last, how can i completely remove the file content, and write
another string in it, writer.writeline just appends a line.
Hannes