title: Input string was not in a correct format in double.Parse
body: <p>I am new to C#. I'm trying to make a calculator, but the following error occurred: </p>
  
  <blockquote>
    <p>Input string was not in a correct format.</p>
  </blockquote>
  
  <p>This is the summary of the code:</p>
  
  <pre><code>double num1, num2, result;
  
  private void button14_Click(object sender, EventArgs e)
  {
      num1 = Convert.ToDouble(textBox1.Text);
      textBox1.Text = String.Empty;
      num2 = double.Parse(textBox1.Text);   **//ERROR OCCURED HERE**
      result = num1 - num2;
  }
  
  private void button13_Click(object sender, EventArgs e)
  {
      num1 = Convert.ToDouble(textBox1.Text);
      textBox1.Text = String.Empty;
      num2 = System.Double.Parse(textBox1.Text);  **//ERROR OCCURED HERE**
      result = num1 + num2;
  }
  </code></pre>
  
  <p>How to convert string to a double type?</p>