十进制与十进制C# [英] Decimal vs decimal c#
本文介绍了十进制与十进制C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
c#中的十进制和十进制有什么区别?
我应该使用哪一个来声明变量?
谢谢
解决方案
它们是同一回事.
Decimal
是CLR类型,而decimal
是c#关键字.
它们对您的程序都是相同的,并且c#在后台创建Decimal
.
要声明变量,请始终使用小数关键字,因为它表示128位数据类型. /blockquote>
Hi,
What is the difference between Decimal and decimal in c#?
Which one should I use to declare a variable?
Thanks解决方案They''re the same thing. Use whichever one pops you cap.
Decimal
is the CLR type anddecimal
is the c# keyword.
They are both the same thing to your programs and c# creates aDecimal
in the background.
To declare a variable always use decimal keyword as it denotes a 128-bit data type.
这篇关于十进制与十进制C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文