I want to convert the integer value of ( 12345 ) to string ( $ 12,345 ) .
Kindly let me know how to implement with this format.
Thanks a lot for viewing my question.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ali tuncerRank #1,499 · 1.1K reputationPosted Jun 28, 2016, 8:29 PM EDT
int test = 12345;
var cultureInfo = CultureInfo.GetCultureInfo("en-US");
Console.WriteLine(string.Format(cultureInfo,"{0:C0}", test));
Vinay SinghRank #604 · 4K reputationPosted Jun 28, 2016, 10:26 PM EDT
Vasanth NatarajanRank #3,352 · 429 reputationPosted Jun 28, 2016, 11:46 PM EDT
return (intMoney / 100m).ToString("c", cInfo); // e.g. 12345 with InvariantCulture is $123.45