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
String.Format("0:C0") for no decimal places.
As per my comment above you can achieve what you desire by cloning a numberformatinfo and set the currency symbol property to empty string
Example can be found here - look down the bottom of the page
EDIT: Here is the above linked post formatted for your question:
var cultureInfo = new CultureInfo("hi-IN")
var numberFormatInfo = (NumberFormatInfo)cultureInfo.NumberFormat.Clone();
numberFormatInfo.CurrencySymbol = "";
var price = 1234567;
var formattedPrice = price.ToString("0:C0", numberFormatInfo); // Output: "12,34,567"