Israel

Israel

  • 701
  • 1.3k
  • 216.6k

How to put dot in decimal number with a label

Jul 26 2018 1:42 PM
Hi,
 
I wrote this code to put the number as decimal (for example 125 300 255,00). But I would like to have this number separated like this 125.300.255,00. But its doesnt put dot between number as I want. Please let see my code:
 
double d1, d2, total;
double.TryParse(number1.Text, out d1);
double.TryParse(number2.Text, out d2);
total = d1 - d2;
finalResult.Text = total.ToString("N2"); //Need the final result here please
 
Thank you,
Israel.

Answers (2)