I've been working on a calculator using C# and came across an issue I haven't been able to work past.

Currently when a user enters a number divided by zero then the answer defaults to 0.00 when instead it should be invalid.

I have no idea why and after tinkering with it for awhile I haven't been able to figure it out. Here is the relevant code:

```
private void button1_Click(object sender, EventArgs e)
{
                double number1, number2, ans; // Identify variables as double to account for decimals.
                number1 = Convert.ToDouble(num1.Text); // Convert the contents of the textBox into a double.
                number2 = Convert.ToDouble(num2.Text); // 
                ans = 0.0;
                string symbol = modifier1.Text;

                if (symbol == "/" && number2 == 0) // This part seems to be broken.
                    answer.Text = "Invalid input.";
                else
                    if (symbol == "+")
                        ans = number1 + number2;
                    else if (symbol == "-")
                        ans = number1 - number2;
                    else if (symbol == "/")
                        ans = number1 / number2;
                    else if (symbol == "*")
                        ans = number1 * number2;
                    else
                        ans = 0;

                    answer.Text = ans.ToString("n"); // Change label value to a number.
}

```

Does anyone have any ideas on how I can fix this? It seems pretty straight forward but I'm missing something.