Guest User

Untitled

a guest
May 20th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. public async void WriteQuestion()
  2. {
  3. question = "Q: " + question + "rn";
  4. using (StreamWriter writer = File.AppendText(nameTest))
  5. {
  6. await writer.WriteAsync(question);
  7. }
  8.  
  9. }
  10.  
  11. // получаем локальную папку
  12. StorageFolder localFolder = ApplicationData.Current.LocalFolder;
  13. // создаем файл hello.txt
  14. StorageFile helloFile = await localFolder.CreateFileAsync("hello.txt",
  15. CreationCollisionOption.ReplaceExisting);
  16.  
  17. // если файл уже ранее был создан, то мы можем получить его через GetFileAsync()
  18. // helloFile = await localFolder.GetFileAsync("hello.txt");
  19.  
  20. // запись в файл
  21. await FileIO.WriteTextAsync(helloFile, text);
Add Comment
Please, Sign In to add comment