Hi Stefan,
You could use ToString methods (Insert, Replace, etc.) to parse it as a string and/or insert the "." and "," manually.
You might use this just as a last resort-or at least after you do all your calculations-because it will be much slower than treating it as a number. Also, this way would bypass your globalization settings, so that might be as preferable.
Eric
"Stefan Richter" <sp**@spammenot.com> wrote in message news:c8***********@otis.netspace.net.au...
Following problem:
On a german computer system I am developing a program for international computer systems,
and I want my programm always to run in the same way.
There's a difference in numbers, we use "," instead of "." and "." instead of ",". (Don't know why!!!)
The method decimal.parse tries to handle that, so when you are using it on a german system,
it seems to handle commas as dots and dots as commas, what I don't want it to do.
I am checking for the length of a number, and if it is bigger then 100,000 an error should get thrown.
But 2 digits are allowed. The problem now is, that when someone enters
90,000.39 it sems to cut out the dot, so when I parse it, it gets the number 9,000,039
which is way to big, and an error gets thrown even though it shouldn't.
What can I do to prefend that???
thx,
Stefan |