I want to add a new line with text to the date.txt file, but instead of adding it to the existing date.txt file, the application creates a new date.txt file.
TextWriter tw = new StreamWriter("date.txt");
I want to open a txt file, add text, close it, and then click something: open the date.txt file, add the text and close it again.
So, I can get:
Button pressed: txt is open → the current time is added, then close it. Another button is pressed, txt is open → the text “OK” or “NOT OK” is added on the same line, then close it again.
So my txt file will look like this:
2011-11-24 10:00:00 OK 2011-11-25 11:00:00 NOT OK
How can i do this? Thank!
c # stream winforms text-files
Elfoc Nov 24 '11 at 10:26 2011-11-24 10:26
source share