Hi all,
Can anyone help me like when I'm reading the local storage file using async call it's not going forward from that line, If I use sync call it's giving "method executing unexpected time error" in UWP app, Please help me on this.
Sample code :
Task.Run(
async () =>
{
Model m = new Model();
Windows.Storage.StorageFile sf = await storageFolder.GetFileAsync(fileName);
var res = Windows.Storage.FileIO.ReadTextAsync(sf).GetResults();
var Data = JsonConvert.DeserializeObject(res);
}).Wait();
Thanks in advance

Laxmidhar SahooPosted Oct 3, 2018, 8:17 AM
Rama KrishnaPosted Oct 3, 2018, 8:10 AM
Laxmidhar SahooPosted Oct 3, 2018, 8:05 AM
>(response.Content);
Rama KrishnaPosted Oct 3, 2018, 7:54 AM
Laxmidhar SahooPosted Oct 3, 2018, 7:53 AM
Rama KrishnaPosted Oct 3, 2018, 7:49 AM
Laxmidhar SahooPosted Oct 3, 2018, 7:21 AM
Rama KrishnaPosted Oct 3, 2018, 7:14 AM
What I understood is like method return type, it is model class and once the file read from class I will return the data to actual page and then i will render that data
Laxmidhar SahooPosted Oct 3, 2018, 6:45 AM
Rama KrishnaPosted Oct 3, 2018, 6:39 AM
Laxmidhar SahooPosted Oct 3, 2018, 6:32 AM