2008年3月26日
摘要: Convert.ToInt32将带小数的数值转换为整数,紧紧是四舍五入吗? Console.WriteLine(Convert.ToInt32(5.5));Console.WriteLine(Convert.ToInt32(6.5)); 你觉得输出的结果是6、7吗?试试看,是6、6!! Why??原来,对于x.5这种数,使用Convert.ToInt32转换时,返回的是其两个边界整数中为偶数的那个... 阅读全文
posted @ 2008-03-26 14:16 Jack Niu 阅读(1615) 评论(5) 推荐(0) 编辑

Affiliate Marketing and Web Technology