I am trying to reading a .txt file of C or D drive in a UWP application. It is ok, when I declare the local variable for file name in assets. But it\'s filed to read file from o
You do not have permission to access the file from your C or D Drive. To do So
You need to copy the file to Project folder (Drag and Drop it your Project)
Then you can use this code to access file
Windows.Storage.StorageFile sampleFile = await storageFolder.GetFileAsync("sample.txt");
if you want to select your file randomly then I would suggest you to use FilePicker
Click here