Bobby White

Bobby White

  • NA
  • 20
  • 0

Quick Question about what Im doing wrong

Jan 27 2010 6:19 PM
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)