10 進数を通貨としてフォーマットする必要がありますが、その過程で丸めを行いたくありません。
例 (例のカルチャは en-US)
Dim money = 1234.556789D
money.ToString("C") ' Yields $1,234.56 (notice the rounding & truncating)
money.ToString("C99") ' Yields $1,234.556789000000000000....0 -- close but not perfect, those trailing zeros are unwanted.
' I want something that would result in this...
money.ToString("??") ' Yields $1,234.56789
' likewise....
money = 0.1D
money.ToString("??") ' Yields $0.10 (notice that it at least matches the culture's currency format -- two decimal places)
このアプリケーションのすべてのユーザーが en_US ルールを使用すると仮定すると、"??" を作成できます。「$#,##0.00######################################」のようにハードコーディングされたものであること########################### 」 - しかし、それは私の胃を混乱させます. 私が求めていることを達成するための組み込みの方法はありますか?