[Mono-list] Group- and Decimal-Separator Problem
hamburg at icomedv.de
Wed Feb 8 09:44:52 EST 2006
its me again :-)
I have a Problem using the correct Group- and Decimalseparator in an
ASP.NET-Application, when trying to parse a string that contains a numeric
string sNum = "12,34";
decimal nNum = decimal.Parse( sNum ); // => 12,34
Now I am trying this:
string sNum = "12.34";
decimal nNum = decimal.Parse( sNum ); // => 1234
I test a lot with NumberFormatInfo without successful Result. As well as
PostgreSQL is using a "." as Decimalseparator. I Germany we are using "," -
but what happens in other Countrys with different Settings?
All that when running in Windows - is there anything special when running in
Mono? For me it seems so, because trying something like that to use
Replace(".",",") - that cant be a good Solution :-)
I am todaly confused what is the correct/best Way to solve this Problem.
What are you doing?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list