Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How do I correctly display exceptions in Forms?

$
0
0

Hi, it might be a stupid and obvious question but a good 30 minutes of searching have turned up in using DisplayAlert. I get the error message "The Name DisplayAlert does not exist in the current context" by the compiler with the code beneath.

public static async void SignIn(){
            try
            {
                await ParseUser.LogInAsync("myname", "mypass");
                // Login was successful.
            }
            catch (Exception ex)
            {
                DisplayAlert ("Error!", "The login failed. Check the error to see why. Error: {0}", ex);
            }
        }

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>