I’m trying not to use the ‘,’ char as a thousand separator when displaying a string, but to use a space instead. I guess I need to define a custom culture, but I don’t seem to get it right. Any pointers?
eg: display 1000000 as 1 000 000 instead of 1,000,000
(no, String.Replace() is not the solution I’d like to use :P)
I suggest you find a
NumberFormatInfowhich most closely matches what you want (i.e. it’s right apart from the thousands separator), callClone()on it and then set theNumberGroupSeparatorproperty. (If you’re going to format the numbers using currency formats, you need to changeCurrencyGroupSeparatorinstead/as well.) Use that as the format info for your calls tostring.Formatetc, and you should be fine. For example: