In C# is it possible to get a currency symbol, like \'£\', from the 3 character currency code, in this case \'GBP\'?
Is this possible either in SQL Server or in C#?<
Try this code. Enter 'USD' as CurrencyCode and all other.
public string getCurrencySymbol(string CurrencyCode)
{
string symbol = string.Empty;
CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);
IList Result = new ArrayList();
foreach (CultureInfo ci in cultures)
{
RegionInfo ri = new RegionInfo(ci.LCID);
if (ri.ISOCurrencySymbol == CurrencyCode)
{
symbol = ri.CurrencySymbol;
return symbol;
}
}
return symbol;
}