The format options for Int32.ToString () see here or here .
For example:
string s = myIntValue.ToString("#,##0");
String.Format can use the same format options as in
string s = String.Format("the number {0:#,##0}!", myIntValue);
Please note that , in this format, do not specify "use a comma", but rather, you should use a grouping of characters for the current culture, in the provisions of culturally specific.
Thus, you get "1,234,567,890" for PL-PL or "1,23,45,67,890" for hi-IN.
Hans ke st ing
source share