c# - Converting TextBox number to the integer -


i'm new c# , i'm doing practice (this isn't homework) okay need convert text box text (called numbers) integer tried like:

int number1; number1 = int.parse(numbers.text); 

then check if it's right:

label1.text = number1.tostring(); messagebox.show(number1.tostring()); 

but integer doesn't hold anything. no message , label doesn't change.

additional question: why doesn't message box doesn't show? there no if statements either switches.

i have verified code, , have posted fine.

i assume problem code isn't being ran. make sure method being called. if can't fix still, add new button on form. double click on button, , add code method automatically created. test clicking on button @ runtime.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo