本文介绍了C# 中 Java BigDecimal 类的等价物是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
BigDecimal
是 java.math
包中的一个类,它对于处理一定规模的大数字有很多好处.c# 中是否有具有此功能的等效类或数据类型.
BigDecimal
is a class in the java.math
package that has a lot of benefits for handling big numbers of a certain scale. Is there an equivalent class or data type in c# with this feature.
推荐答案
C# 只有 BigInteger
构建了它(在 .NET framework 4 中).
C# only has BigInteger
built it (in .NET framework 4).
decimal
对您的任务是否足够精确?它是一个 128 位的数字,可以保存在 ±1.0 × 10 到 ±7.9 × 10 范围内的值.
Is decimal
enough precision for your task? It's a 128-bit number that can hold values in the range ±1.0 × 10 to ±7.9 × 10.
这篇关于C# 中 Java BigDecimal 类的等价物是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!