I have a really simple question (I'm new to c# visual studios) about the try catch method:
try
{
double seven = 7
MessageBox.Show("You Picked 7!");
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
I tried replacing the MessageBox.Show(ex.Message);
with MessageBox.Show("Please enter a number.");
but it won't work.
How should I approach this? There is the error line under the ("Please enter a number."). Thanks in advance!