我已經看遍了所有的地方!我發誓!即時通訊嘗試讓我的輸出顯示「$」和兩個小數點右邊的期間。即時通訊使用C#顯示美元符號和兩位小數
//declare variable
decimal decInputDays;
decimal decInputAmountofBooks;
decimal decOutputAmountofFine;
decimal FINE_CALCULATE = .05m;
//get values from the form
decInputDays = decimal.Parse(txtDays.Text);
decInputAmountofBooks = decimal.Parse(txtBooks.Text);
//determine fine amount
decOutputAmountofFine = decInputDays * decInputAmountofBooks * FINE_CALCULATE;
//display fine amount
lblAmount.Text = decOutputAmountofFine.ToString("c");
對不起,使用im C# – ntrnlerror9