www.cftea.com

C# int 相除要注意

ITPOW2016/12/23 14:33:12

如上代码:m / n 的结果是 0,并不是 0.5。要得到小数,得转换一下,比如:Convert.ToDecimal(m) / n。

<<返回首页<<