Extracting numerical value from text box

  • Thread starter Thread starter Ian Eagland
  • Start date Start date
I

Ian Eagland

Hi

I am just starting on Visual C (2003) from a VB background. I find it easier
to learn by actually programming. I have fallen over at the first hurdle.
How do you extract a numerical value from a text box? I have a number of
reference books but it is not mentioned because I guess it is simple and I
am just missing it.

Regards

Ian Eagland
 
I am just starting on Visual C (2003) from a VB background. I find it
easier to learn by actually programming. I have fallen over at the first
hurdle. How do you extract a numerical value from a text box? I have a
number of reference books but it is not mentioned because I guess it is
simple and I am just missing it.

Hi,
get the string value out of the textbox, and then use the Convert class to
convert the string value to a numerical value.
for example, you could use Convert.ToInt32(string_value);

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
,
get the string value out of the textbox, and then use the Convert class to
convert the string value to a numerical value.
for example, you could use Convert.ToInt32(string_value);

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"


Many thanks, I knew it had to be simple


Regards

Ian
 
Back
Top