check if text box is integer

Im righting a program and i have a button that when i push, i want it to check the value's of a couple of boxes then store the values in a notpad document. but i cant figure out how to check if the values are integer value, without using a bunch of or's and if's. there is an easy way right? can someone assist me please? =)thank you

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (textBox1.Text == 
what gui framework are you using? most of them have a way to specify the input type a textbox can accept so you could always use that type of functionality to limit it do numerical input. Otherwise you just loop through the elements of the string you got from the textbox and use isdigit() on it.
Last edited on
im using VS 2010's windows forms application. I couldnt find a property to specify the input type. I might have missed it. i think ill try the isdigit() method.

edit: thanks for the super duper fast reply
Last edited on
Topic archived. No new replies allowed.