all groups > dotnet internationalization > august 2005 >
You're in the

dotnet internationalization

group:

Using Both '.' and ',' as decimal separator?


Using Both '.' and ',' as decimal separator? Peter Erikson
8/3/2005 1:06:22 AM
dotnet internationalization:
Hi,

Does anyone know if there is a way to for instance modify the
Thread.CurrentThread.CurrentUICulture or Thread.CurrentThread.CurrentCulture
to make parsing of strings to numbers (gui input) work with both '.' and ','
as a decimal separator? And when numbers parsed to strings just one of the
separators should be used ('.' for instance)?

The thing is that i wouldnt want to modify all the places in my app when
numeric GUI input is parsed with some sort of custom decimal parser.

Does anyone have some idea how this can be solved?

Thanx!

/Peter Erikson
Re: Using Both '.' and ',' as decimal separator? Michael (michka) Kaplan [MS]
8/3/2005 7:36:56 AM
There is no way to have both work at once -- you can at best try one and
then try the other.


--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.

[quoted text, click to view]

Re: Using Both '.' and ',' as decimal separator? Peter Erikson
8/3/2005 8:18:03 AM
OK, Thanks for the info.

/Peter Erikson



[quoted text, click to view]
AddThis Social Bookmark Button