decimal value = 10000;
var str = value.ToString("N0").Replace(",",".");
Output : 10.000
Is there a better way to seperate digits without using Replace
?
decimal value = 10000;
var str = value.ToString("N0").Replace(",",".");
Output : 10.000
Is there a better way to seperate digits without using Replace
?
Try like this;
decimal value = 10000;
var str = value.ToString("N0",CultureInfo.CurrentCulture);
Also, you can configure the culture as you wish. Like;
CultureInfo.CreateSpecificCulture("en-En")
Please refer this post;