Add standard format for price display to 3 decimals.
This commit is contained in:
@@ -11,6 +11,7 @@ using MarketData.MarketDataModel;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using ThreadState=System.Threading.ThreadState;
|
||||
using System.Net;
|
||||
|
||||
namespace MarketData.Utils
|
||||
{
|
||||
@@ -419,6 +420,13 @@ namespace MarketData.Utils
|
||||
else sb.Append(String.Format("{0:C}", number));
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
public static String FormatPrice(double price)
|
||||
{
|
||||
return FormatCurrency(price, 3);
|
||||
}
|
||||
|
||||
public static String FormatCurrency(double number,int decimals)
|
||||
{
|
||||
StringBuilder sb=new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user