这里有详细的介绍
ms-help://MS.VSCC/MS.MSDNVS/csref/html/vcrefTheDecimalType.htm可以表示这么大的数:
Your amount = $9,999,999,999,999,999,999,999,999,999.00

解决方案 »

  1.   

    decimal d_value=1.0m;m --> decimal type, if you have only 1.0, by default, it is a doubleit is similar to
    float d = 1.0f;
      

  2.   

    ms-help://MS.VSCC/MS.MSDNVS/csref/html/vcrefTheDecimalType.htm
    这是安装msdn后的 在本机上的连接,不是internet上的
    -----MSDN-----
    Literals
    If you want a numeric real literal to be treated as decimal, use the suffix m or M, for example:
    decimal myMoney = 300.5m;
    Without the suffix m, the number is treated as a double, thus generating a compiler error.
    -----MSDN-----
    用m或M后缀是为了让编译器区分 decimal 类型和 double类型
      

  3.   

    啊哦,因为我赚MSDN太大了,小弟又穷得可怜没钱买硬盘,所以我没装啊!!:)