How do I convert string to Indian Money format?

前端 未结 4 836
感动是毒
感动是毒 2020-12-01 22:13

I am trying to convert string to India Money format like if input is \"1234567\" then output should come as \"12,34,567\"

I have written following code but its not g

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 22:35

    Try this

    int myvalue = 123456789;
    Console.WriteLine(myvalue.ToString("#,#.##", CultureInfo.CreateSpecificCulture("hi-IN")));//output;- 12,34,56,789
    

提交回复
热议问题