R
Rob Meade
Hi all,
Ok, I'm used to VBScript with stuff like IsNumeric and the like...
How can I test a value is a numeric value in .net / win forms?
I have multiple text boxes and the user is able to enter numbers like thus:
1.01
5.50
and so on, I have some formatting going on to always return 2 decimal places
etc, but how can I test this is a number?
Also, when I set my variables when the button is clicked, should I take all
of the values as 'strings' to start with and then convert them (or try to) ,
or should I declare them as what I want them to be and then try to trap the
errors when they fail...ie, someone enters:
adfsd
in my nice number box....
Any info appreciated
Regards
Rob
Ok, I'm used to VBScript with stuff like IsNumeric and the like...
How can I test a value is a numeric value in .net / win forms?
I have multiple text boxes and the user is able to enter numbers like thus:
1.01
5.50
and so on, I have some formatting going on to always return 2 decimal places
etc, but how can I test this is a number?
Also, when I set my variables when the button is clicked, should I take all
of the values as 'strings' to start with and then convert them (or try to) ,
or should I declare them as what I want them to be and then try to trap the
errors when they fail...ie, someone enters:
adfsd
in my nice number box....
Any info appreciated
Regards
Rob