-2
我試着去獲得CTOTAL的75%,但因爲它是一個十進制數,它是四捨五入0.75至0,沒有人知道一個工作圍繞用一個浮點數
decimal refundtot = order.CTotal;
//change it as it is making it = 0
refundtot = (75/100) * refundtot;
refund.RefundTotal = refundtot;
檢查了這一點:https://stackoverflow.com/questions/1043164/why-does-decimal-divideint-int-work-but-not-int -int –
你解決了你的問題嗎? –
@BobSwager是的,謝謝 – mmmmmkeyisstuckmmmmmmmmmm