How to Create a Text File within the Application in Windows Phone 8.1 ?


This content was proof-read by Grammarly. You can Try Grammary for FREE

Below is a sample code that lets you to create a text file within the application local folder in Windows Phone 8.1.

How to Create a Text File within the Application in Windows Phone 8.1 ?

var localAppFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
var fileHandle = await localAppFolder.CreateFileAsync("AbundantcodeData.txt", Windows.Storage.CreationCollisionOption.ReplaceExisting);
await Windows.Storage.FileIO.WriteTextAsync(fileHandle, "Abundantcode is one of the popular programming website");
%d bloggers like this: