Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您可以使用以下代码(“d”字母)指定一个数字是双精度数:
double hi = 12d;
如何说一个数字是长整数还是小数?
decimal dcml = 12?; long lng = 12?;
long 的类型后缀是 L 十进制的类型后缀是 M
decimal dcml = 12M; long lng = 12L;
这是一篇简单的文章作为参考(简单的意思是更容易阅读和消化,而不是简单化)这是C# 语言规范 中整数和实数的参考
像这样