Currency Format in C# to shorten the output string
- by james.ingham
Hey, I currently have a Currency Format method:
private string FormatCurrency(double moneyIn)
{
CultureInfo ci = new CultureInfo("en-GB");
return moneyIn.ToString("c", ci);
}
I'm looking to adapt this to shorten the string as the currency get's larger. Kind of like how stack overflow goes from 999 to 1k instead of 1000 (or 1.6k instead of 1555).
I imagine that this is a relativly easy task however is there any built in function for it or would you just have to manually manipulate the string?
Thanks