I'm new in UWP application development and I want to create folder using LocalStorage so I have something like:
private static StorageFolder _settingsFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
public async static Task<bool> SaveUsers(string file, List<mymodel> data)
{
try
{
StorageFile currentFile = await _settingsFolder.CreateFileAsync("myfile.json", CreationCollisionOption.ReplaceExisting);
return true;
}
catch
{
return false;
}
}
but it just throw an error:
'IAsyncOperation' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'IAsyncOperation' could be found (are you missing a using directive for 'System'?)
I read another questions about GetAwaiter
issue but I can not found a fix to this. Regards