0
how enter numbers looks like integer in textbox in c#
5 odpowiedzi
+ 5
if you get the numbers from the textbox you will need parsing them
+ 4
@wail when you get numbers from a textbox, those "numbers" are text, so if you need use them for some reason, you will need convert that "numbers" into some type, for example, if you get "505" from a textbox, 505 is a string, so to convert that "number" to a integer, you would coding something like int myNumber = int.Parse("505")
+ 2
try this
texbox1 is the textbox
try{
int no = int.Parse(textbox1.Text);
}Catch(Exception e){
MessageBox.Show("enter a valid number");
}
0
what you mean parsing them
0
Angel can you give me simple example