C# int 相除要注意
ITPOW2016/12/23 14:33:12
int m = 1; int n = 2;
如上代码:m / n 的结果是 0,并不是 0.5。要得到小数,得转换一下,比如:Convert.ToDecimal(m) / n。
<<返回首页<<