Question how can i save to file without savefiledialog

Infinity

Member
Joined
Sep 7, 2009
Messages
6
Programming Experience
Beginner
hi guys
how can i save or load info to/from a txt file without going through the savefiledialog.

i want to load and save invisibly using code
thanx in advance.
 
much appreciated

havnt tried yet but i assume i can read and write line by line using that method aswell instead of read all.
 
You can call WriteAllLines and ReadAllLines to write a String array to a file or read a String array from a file. If you genuinely need to read or write one line at a time then you would create a StreamReader or StreamWriter and call ReadLine or WriteLine.
 
Thanks thats what i did in the end, as i need to load the text file line by line, because i need to do different things depending on what text the line holds.

I appreciate all the help thanx
 
Back
Top