Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async void WriteQuestion()
- {
- question = "Q: " + question + "rn";
- using (StreamWriter writer = File.AppendText(nameTest))
- {
- await writer.WriteAsync(question);
- }
- }
- // получаем локальную папку
- StorageFolder localFolder = ApplicationData.Current.LocalFolder;
- // создаем файл hello.txt
- StorageFile helloFile = await localFolder.CreateFileAsync("hello.txt",
- CreationCollisionOption.ReplaceExisting);
- // если файл уже ранее был создан, то мы можем получить его через GetFileAsync()
- // helloFile = await localFolder.GetFileAsync("hello.txt");
- // запись в файл
- await FileIO.WriteTextAsync(helloFile, text);
Add Comment
Please, Sign In to add comment