I am writing a program where the user inputs currency in US dollars. I want
the program to only accept valid currency input, converting the string into
the proper type of variable (double?), and to make sure there are no illegal
characters entered so that it doesn't make an error. I basically want it to
strip out any characters that aren't numbers, in case the user enters
something like "$34.23".
So far, in my hours of research today I have turned up some evidence that
this involves 'parse,' but I can't figure out the exact way to use it.
I am lost, but this is as far as I have made it so far. It doesn't work
("name 'numberstyles' not declared")
something like this?
Dim strUserInput As Double = Double.Parse(TextBox1.Text,
NumberStyles.Currency)