十进制与十进制C# [英] Decimal vs decimal c#

查看:91
本文介绍了十进制与十进制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 and decimal is the c# keyword.

They are both the same thing to your programs and c# creates a Decimal in the background.


To declare a variable always use decimal keyword as it denotes a 128-bit data type.


这篇关于十进制与十进制C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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