3
Answers

Quick Question about what Im doing wrong

Photo of Bobby White

Bobby White

15y
3.2k
1
It is saying that input string was not in correct format, the line thats bold is the problem? Please tell me whats wrong with it, and how to fix it, thanks in advance.



 {
            double a;
            double b;
            double c;

            a = double.Parse(textBox1.Text);
            b = double.Parse(textBox2.Text);

            c = Math.Sqrt((a * a) + (b * b));

            label1.Text = c.ToString();
           
        }

Answers (3)