Forum Xamarin.Forms

Questions about async/await

DanielLee.7909DanielLee.7909 USMember ✭✭
edited June 2017 in Xamarin.Forms
async void SomeMethod(objecty sender, EventArgs args) {
    await Navigation.PushAsync(new SomePage());

    // logic that needs to be run after SomePage stopped running

I have the following code above that needs to be run. I thought using 'await' to push a new page would cause the logic that came after opening a new page would run only AFTER the completion of "SomePage", but it did not.

Am I missing something here? what would be the ways to have the logic code run only after the completion of "SomePage"?

Thank you!

Best Answers


Sign In or Register to comment.