Re: Non-locale-specific floating point numbers
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Thu, 18 Jan 2007 20:03:50 -0500
Mike Schilling wrote:
I want to write some C# that converts between floating-point numbers and strings in a non-locale-specific way. That is, I want decimal points always to be ".", etc. The simple overloads of Double.ToString() and Double.Parse() change their behavior depending on locale. I'm considering creating a static en-us locale and passing it to the overloads of Parse and ToString that take a locale, but is there a better way?
I think it is much nicer to pass a locale to the methods
as you suggest than messing with the global one.
Arne
.
- References:
- Non-locale-specific floating point numbers
- From: Mike Schilling
- Non-locale-specific floating point numbers
- Prev by Date: Re: MS's official variable/function naming standard
- Next by Date: IPV6 Multicast Sockets
- Previous by thread: Re: Non-locale-specific floating point numbers
- Next by thread: Re: Non-locale-specific floating point numbers
- Index(es):
Relevant Pages
|