摘要:今天看到群里面有人在问:double tempf = 20 / 230; tempf = ?? 有人回答: 0.086956521739130434782608695652174 这显然是用计算器算出来的。但是在.NET中,结果是0.0 但是为什么呢?其实一点儿不奇怪,在.NET中,对整数除法定义如下: 整数除法: int operator /(int x, int y); uint ope...
阅读全文
posted @ 2005-12-13 15:51