creating text files

tahu191

Well-known member
Joined
Oct 27, 2005
Messages
48
Location
USA
Programming Experience
Beginner
I need to create a text file where each line is created by a different variable. The first line may be the score and the second line is high game and so on. The file name will be the name the user enters. The file should save when the button is clicked and not show the save file dialog.
 
open a filestream
VB.NET:
dim fs as new system.io.filestream(filenameString,filemode,fileaccess,fileshare)
declare streamWriter
VB.NET:
dim ws as new system.io.streamWriter(fs)
to write data
VB.NET:
ws.writeline(string)
close writer
VB.NET:
ws.close

file is saved
 
Back
Top