问题描述
大家好!
现在我使用此代码获得最大收益:
newRow.ToAmount = 922337203685477.5807M;
在db ToAmount中是货币类型。我正在使用表实体。
当我更新值max maximum。它显示错误
Hi all !!!
Now i get max money by using this code:
newRow.ToAmount = 922337203685477.5807M;
In db ToAmount is money type. I am using table entity.
when i update value max decimal . it shows error
推荐答案
newRow.ToAmount = Decimal.MaxValue;
代替。
你可以参考 []。
事实上,货币类型的范围是-922,337,203,685,477.5808到922,337,203,685,477.5807。 br />
所以你的初始陈述似乎是正确的(即这个值包含在货币类型的有效范围内)。
instead.
You may refer to money and smallmoney (Transact-SQL)[^].
Indeed it is stated that money type ranges from -922,337,203,685,477.5808 to 922,337,203,685,477.5807.
So your initial statement seems to be correct (i.e. this value is included in the valid range for a money type).
这篇关于C#中的最大货币价值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!