2
Answers

How to put dot in decimal number with a label

Israel

Israel

6y
599
1
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)