I need to convert numbers into a comma separated format to display in C#
.
For Example:
1000 to 1,000
45000 to 45,000
150000 to 1,50,000
21545000 to 2,15,45,000
How to achieve this in C#
?
I tried the below code:
int number = 1000;
number.ToString("#,##0");
But it is not working for lakhs
.