In Silverlight Out of Broweser, How does one: 1) Throw an Exception 2) Display Messagebox with the error 3) Terminate the Application?
Can't seem to find any info on the net. Cheers!
In Silverlight Out of Broweser, How does one: 1) Throw an Exception 2) Display Messagebox with the error 3) Terminate the Application?
Can't seem to find any info on the net. Cheers!
Exceptions work in Silverlight as in any C# code.
Here's a simple sample code that should help you.
try
{
//Whatever you want to try
}
catch(Exception e)
{
//Display error message
MessageBox.Show(e.Message);
//Close the application
Application.Current.MainWindow.Close();
}