title: RadioButton being selected is wrong
body: <p>I am having some issues with a form I built in Visual Studio. Whenever I type in 2 numbers and hit the Modulus Radio Button. It is automatically changing to divide and I am unsure why. I have attached my code. I am putting 2 values into my Textbox and if I Check the Verbose Checkbox I have and hit Calculate. It performs division instead of Performing Modulus like i told it to. </p>
  
  <pre><code>namespace Module10Project
  {
      public partial class frmRadioStar : Form
      {
  
          const byte ADD = 0;
          const byte SUBTRACT = 1;
          const byte MULTIPLY = 2;
          const byte DIVIDE = 3;
          const byte MODULUS = 4;
  
          public bool isPresent(TextBox txtLeft, TextBox txtRight)
          {
              if(txtLeft.Text == "" || txtRight.Text == "")
              {
                  lblMessage.Text = "Please enter a number into the Textbox";
                  return false;
              }
              else
              {
                  return true;
              }
          }
  
          public bool divideByZero(TextBox Left, TextBox Right)
          {
              int leftOperand = Convert.ToInt32(Left.Text);
              int rightOperand = Convert.ToInt32(Right.Text);
  
              if(leftOperand == 0 || rightOperand == 0)
              {
                  lblMessage.Text = "Unable to divide by 0";
                  return false;
              }
              else
              {
                  return true;
              }
          }
  
          private int equationCalculation(int Left, int Right, byte operation)
          {
              int result = 0;
  
              if (operation == 0)
                  result = Left + Right;
              else if (operation == 1)
                  result = Left - Right;
              else if (operation == 2)
                  result = Left * Right;
              else if (operation == 3)
                  result = Left / Right;
              else if (operation == 4)
                  result = Left % Right;
              return result;
          }
  
  
          public bool isValid(TextBox Left, TextBox Right)
          {
              if (isPresent(Left, Right) &amp;&amp; divideByZero(Left, Right))
                  return true;
              else
                  return false;
          }
          public frmRadioStar()
          {
              InitializeComponent();
          }
  
          private void btnExit_Click(object sender, EventArgs e)
          {
              this.Close();
          }
  
          private void btnReset_Click(object sender, EventArgs e)
          {
              txtLeft.Text = "";
              txtRight.Text = "";
              lblMessage.Text = "";
              chkVerbose.Checked = true;
              btnAdd.Focus();
              txtLeft.Focus();
          }
  
          private void btnCalculate_Click(object sender, EventArgs e)
          {
              try
              {
                  if(isValid(txtLeft, txtRight))
                  {
                      int result = 0;
                      int leftOperand = Convert.ToInt32(txtLeft.Text);
                      int rightOperand = Convert.ToInt32(txtRight.Text);
  
                      if (btnAdd.Checked == true &amp;&amp; chkVerbose.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 0);
                          lblMessage.Text = leftOperand.ToString() + " + "+ rightOperand.ToString() + " = " + result.ToString();
                      }
                      else if (btnAdd.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 0);
                          lblMessage.Text = "The Answer is: " + result.ToString();
                      }
                      else if(btnSubtract.Checked == true &amp;&amp; chkVerbose.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 1);
                          lblMessage.Text = leftOperand.ToString() + " - " + rightOperand.ToString() + " = " + result.ToString();
                      }
                      else if(btnSubtract.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 1);
                          lblMessage.Text = "The answer is: " + result.ToString();
                      }
                      else if(btnMultiply.Checked == true &amp;&amp; chkVerbose.Checked == true )
                      {
                          result = equationCalculation(leftOperand, rightOperand, 2);
                          lblMessage.Text = leftOperand.ToString() + " * " + rightOperand.ToString() + " = " + result.ToString();
                      }
                      else if(btnMultiply.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 2);
                          lblMessage.Text = "The answer is: " + result.ToString();
                      }
                      else if(btnDivide.Checked = true &amp;&amp; chkVerbose.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 3);
                          lblMessage.Text = leftOperand.ToString() + " / " + rightOperand.ToString() + " = " + result.ToString();
                      }
                      else if(btnDivide.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 3);
                          lblMessage.Text = "The answer is: " + result.ToString();
                      }
                      else if(btnMod.Checked == true &amp;&amp; chkVerbose.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 4);
                          lblMessage.Text = leftOperand.ToString() + " % " + rightOperand.ToString() + " = " + result.ToString();
                      }
                      else if(btnMod.Checked == true)
                      {
                          result = equationCalculation(leftOperand, rightOperand, 4);
                          lblMessage.Text = "The answer is: " + result.ToString();
                      }
                  }
              }
              catch(Exception ex)
              {
  
              }
         }
      }
  }
  </code></pre>