Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

textbox input to arrayList


This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 tim


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 28 May 2016 - 09:32 PM

  Once I have checked for a number, how do I add this to an arraylist? Then with the next entry being (+,-,/,*) to call a calulation method.


  private void txtCalculation_KeyPress(object sender, KeyPressEventArgs e)
            int input1;
            if ((e.KeyChar == (char)13) && (txtCalculation.Text == ""))
                MessageBox.Show("Please enter a number");
                e.Handled = true;
                e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
                input1 = int.Parse(txtCalculation.Text);
            ArrayList theCalcs;


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download