how to write text to a file in .net for windows store.. for crying out loud -


this question has answer here:

i have list of strings.

i want output them txt file.

very simple in .net traditionally, done single line of code.

however .net windows store:

file.writealllines - doesnt work using streamwriter - doesnt work

for crying out loud. please. somebody. help.

one of easiest ways:

var myfile = await applicationdata.current.localfolder.createfileasync("myfile.txt", creationcollisionoption.replaceexisting); await fileio.writetextasync(myfile, "string content"); 

Comments