I wonder what would be the best way to format numbers so that the NumberGroupSeparator
would work not only on the integer part to the left of the comma, but also on
OK, not my strong side, but I guess this may be my best bet:
string input = Math.PI.ToString();
string decSeparator = System.Threading.Thread.CurrentThread
.CurrentCulture.NumberFormat.NumberGroupSeparator;
Regex RX = new Regex(@"([0-9]{3})");
string result = RX.Replace(input , @"$1" + decSeparator);
Thanks for listening..