All pastes #404701 Raw Edit

Generic

public text v1 · immutable
·published 2007-03-21 05:00 UTC
rendered paste body
 if (txtFirstNumber.TextLength > 0 && txtSecondNumber.TextLength > 0)
            {
                int exp = 0;
                //Check that the second number is an integer
                try
                {

                    if (isInt(txtSecondNumber.Text) == true)
                    {
                        exp = Convert.ToInt32(txtSecondNumber.Text);
                    }
                    

                }
                //If it is not an integer, give an error
                catch (FormatException)
                {
                    MessageBox.Show("Second number must be an integert value.");
                    txtSecondNumber.Focus();

                }