【发布时间】:2013-05-02 16:21:24
【问题描述】:
我在做:-
Decimal production = 0;
Decimal expense = 5000;
Decimal.ToUInt64(production - expense);
但它会抛出异常并显示以下错误消息。
"Value was either too large or too small for a UInt64"
谁能给我一个解决方法。
谢谢!
编辑
无论如何,我希望结果为正数。
【问题讨论】:
-
负数
-
-1:缺少所需结果的详细信息:您希望 -5000 如何以无符号数表示????
标签: c# type-conversion decimal uint64