public static string GetCurrencyStringSimple(CurrencyNumber num) { string[] prettyArr = num.AbbreviationComponents(); string result = prettyArr[0]; if (!string.IsNullOrEmpty(prettyArr[1])) { result += " " + prettyArr[1]; } return(result); }
private string FormatProfit(CurrencyNumber number) { string[] components = number.AbbreviationComponents(); if (!string.IsNullOrEmpty(components[1])) { return($"${components[0]} {components[1]}/SEC"); } else { return($"${components[0]} {DollarsString}/SEC"); } }