title: i write a calculator.everything work,but when i want use dot '.' for Decimals its jump out.i cant understand whats wrong
body: <pre><code>  public partial class Form1 : Form
      {
          double resualt,oprand1,oprand;
          char oprand2;
  
   private void Dot_Click(object sender, EventArgs e)
          {
              tb.Text += dot.Text;
              
          }
   private void B1_Click(object sender, EventArgs e)
          {
              tb.Text += b1.Text;
          }
  
   private void Sum_Click(object sender, EventArgs e)
          {
              oprand1 += double.Parse(tb.Text);
              tb.Clear();
              oprand2 = '+';
          }
     private void Rzat_Click(object sender, EventArgs e)
          {
              oprand = double.Parse(tb.Text);
              switch(oprand2)
              {
                  case '+':
                  {
                      resualt = oprand1 + oprand;
                      break;
                  }
                  case '-':
                   {
                          resualt = oprand1 - oprand;
                          break;
                   }
                
              }
              oprand1 = 0;
              tb.Text = resualt.ToString();
          }
  
  </code></pre>
  <p>i write code for all number and + - * / but i cant use dot'.'every thing work until i use for example 4.5+ and its jump out and give me a error! <a href="https://i.stack.imgur.com/CiKjF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CiKjF.png" alt="enter image description here" /></a></p>