摘要: 在c#中除法默认不保留小数点,看看下面的结果decimal result = 100 / 1000; // result = 0;需要保留小数点,可以如下decimal result = 100m / 1000;m代表decimal.如果是变量要如何处理呢?这是需要用到Math.Round()int x= 120;int y= 100000;decimal result = (decimal)x ... 阅读全文
posted @ 2008-10-31 16:44 IT高薪猎头 阅读(8825) 评论(2) 推荐(0) 编辑