I am learning about async
and await
. I have an async method for dialog message and I am doing await to another method.
My code=>
private async Task CalculateProcess()
{
dialogCoordinator = DialogCoordinator.Instance;
// Show...
ProgressDialogController controller = await dialogCoordinator.ShowProgressAsync(this, "HEADER", "MESSAGE");
controller.SetIndeterminate();
// Do your work...
await testing();//I want to await testing method but i cant await testing because testing method no return task
// Close...
await controller.CloseAsync();
}
private void testing()
{
for(int i=0;i<=1000000;i++)
{
}//Looping is example
}
I want to await to testing method but if I want to use await I need to return task from testing.How can I await testing method if I don't have any other returning task?