Add Culture to FormatCurrnecy
This commit is contained in:
@@ -520,15 +520,15 @@ namespace MarketData.Utils
|
||||
else sb.Append(String.Format(formatString.ToString(), number));
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static String FormatCurrency(double number)
|
||||
{
|
||||
StringBuilder sb=new StringBuilder();
|
||||
if (double.NaN.Equals(number))sb.Append("N/A");
|
||||
else sb.Append(String.Format("{0:C}", number));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (double.NaN.Equals(number)) sb.Append("N/A");
|
||||
else sb.Append(String.Format("{0:C}", number, new CultureInfo("en-US")));
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
public static String FormatPrice(double price)
|
||||
{
|
||||
return FormatCurrency(price, 3);
|
||||
|
||||
Reference in New Issue
Block a user