Converting TextBox number to the integer
Okay so I need to convert a text box text (called Numbers) into an integer
I tried something like:
int number1;
number1 = int.Parse(Numbers.Text);
Then to check if it's right:
label1.Text = number1.ToString();
MessageBox.Show(number1.ToString());
But integer doesn't hold anything. I get no Message and the label doesn't
change.
Additional question: Why doesn't the message box doesn't show? There were
no if statements either switches.
No comments:
Post a Comment