是Java的BigDecimal对应的C#十进制的最近数据类型? [英] Is Java's BigDecimal the closest data type corresponding to C#'s Decimal?

查看:1209
本文介绍了是Java的BigDecimal对应的C#十进制的最近数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据图表这里,等效数据类型Java中的C#十进制就是BigDecimal的。

According to the chart here, the equivalent data type in Java to C#'s Decimal is "BigDecimal".

这是真的如此?什么是与大的序言?似乎没有成为一个SmallDecimal或LittleDecimal(更不用说MediumSizedDecimal)在Java中。

Is this really so? What's up with the "Big" preamble? There doesn't seem to be a "SmallDecimal" or "LittleDecimal" (let alone "MediumSizedDecimal") in Java.

我必须说,虽然该图表是最明显的一点我关于这个问题的发现;这里其他环节和的here 并的这里大约为清楚,我作为密西西比河滔滔风暴后

I must say, though, that chart was the clearest thing I found on the subject; the other links here and here and here were about as clear to me as the Mississippi River after a torrential tempest.

推荐答案

是的 - 。这是相应类型

Yep - that's the corresponding type.

既然你后C#中使用Java的 - 不要太惊讶地发现细微差别这样的 - 或者太沮丧时,有没有简单的这样做的东西是容易做C#。这使我想到的第一件事为int&安培;诠释? - 在Java中,你只需要使用int和整数

Since you are using Java after C# - don't be too surprised to find little nuances like this - or be too upset when there is no easy way to do something that's "easy" to do C#. The first thing that comes to my mind is int & int? - in Java you just use int and Integer.

C#有Java的到来后的奢华所以很多(我主观上看到的)错误决定已得到修复/流线型。此外,它帮助了C#是由安德烈斯Hejlsberg为(谁可以说是最好的编程语言之一设计师还活着),并定期为更新Java不同(你可能看到添加到C#万物自2000年以来 - 的完整列表

C# had the luxury of coming after Java so lots of (what I subjectively see as) bad decisions have been fixed/streamlined. Also, it helps that C# was designed by Andres Hejlsberg (who is arguably one of the best programming language designers alive) and is regularly "updated" unlike Java (you probably witnessed all things added to C# since 2000 - complete list)

这篇关于是Java的BigDecimal对应的C#十进制的最近数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆