by Michael S. Kaplan, published on 2005/11/24 04:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/11/24/495349.aspx
There is some sort of implicit belief that if a locale property is settable that it should be set.
Up to and including the .NET Framework 2.0, there are a few of the properties that violate that belief in the NumberFormatInfo class and that should not be set:
I should probably back up a second and explain when they are meant to be set, and more importantly when setting them will not actually accomplish anything.
These four properties can be set any time you are using a NumberFormatInfo object to do work. The first three will affect percent formatting and parsing, while the last one will do very little at all.
These four properties should not be set on the NumberFormat hanging off the CultureAndRegionInfoBuilder class.
Well, you can set them if you want. But the values you set will not be persisted in the custom culture. So setting them when you are creating a custom culture will not actually accomplish anything. So why spend the time?
The rules whereby the values are set vary for each property:
The reasons? Well, I am not sure who uses the PerMilleSymbol so I do not know for sure, but I would guess that the reason is the same as the other three properties: that there is no locale/culture that we know of that reports a different value for these properties.
Until/unless that changes, these are four properties that you should not try to set in your custom cultures....
This post brought to you by "‰" (U+2030, a.k.a. PER MILLE SIGN)
# Mihai on 25 Nov 2005 6:32 AM:
# Michael S. Kaplan on 25 Nov 2005 10:30 AM:
referenced by