What I want
open a file if it exists, create it if it not exists
What I code
try
{
return await folder.GetFileAsync(fileName);
}
catch (FileNotFoundException )
{
StorageFile file = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName);
return file;
}
What the error
Cannot await in the body of a catch clause
How to make it?