C# string format sepperate every thousand

39

C# string format sepperate every thousand -

var nfi = (NumberFormatInfo)CultureInfo.InvariantCulture.NumberFormat.Clone();
nfi.NumberGroupSeparator = " ";
string formatted = 1234897.11m.ToString("#,0.00", nfi); // "1 234 897.11"

Comments

Submit
0 Comments