txt.Text=String.Format("{0:C}", test*(-1)).Replace(",", " ");
txt.Text=String.Format("{0:C}", test*(-1)).Replace(",", " ").Replace("$", "");
char[] numberText = value.ToCharArray(); for (int i = 0; i < numberText.Length; ++i) { if (numberText[i].Equals(',')) { numberText[i] = ' '; } } return new String(numberText);
var number = "2500"; NumberFormatInfo nfi = (NumberFormatInfo)CultureInfo.InvariantCulture.NumberFormat.Clone(); nfi.NumberGroupSeparator = " "; double text = double.Parse(number); var finalFormatNumber = text.ToString("n", nfi); Console.WriteLine(finalFormatNumber);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)