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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vasanth NatarajanPosted Jun 29, 2016, 3:46 AM
return (intMoney / 100m).ToString("c", cInfo); // e.g. 12345 with InvariantCulture is $123.45
Vinay SinghPosted Jun 29, 2016, 2:26 AM
ali tuncerPosted Jun 29, 2016, 12:29 AM
int test = 12345;
var cultureInfo = CultureInfo.GetCultureInfo("en-US");
Console.WriteLine(string.Format(cultureInfo,"{0:C0}", test));