int 是 64 位 C# 中的 64 位整数吗?

编程入门 行业动态 更新时间:2024-10-25 18:35:43
本文介绍了int 是 64 位 C# 中的 64 位整数吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的 C# 源代码中,我可能将整数声明为:

In my C# source code I may have declared integers as:

int i = 5;

Int32 i = 5;

在当前流行的 32 位世界中,它们是等效的.但是,随着我们进入 64 位世界,我说以下内容会变得相同是否正确?

In the currently prevalent 32-bit world they are equivalent. However, as we move into a 64-bit world, am I correct in saying that the following will become the same?

int i = 5; Int64 i = 5;

推荐答案

没有.C# 规范严格定义 int 是 System.Int32 的别名,正好是 32 位.改变这将是一个重大突破性变化.

No. The C# specification rigidly defines that int is an alias for System.Int32 with exactly 32 bits. Changing this would be a major breaking change.

更多推荐

int 是 64 位 C# 中的 64 位整数吗?

本文发布于:2023-11-30 05:40:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1648912.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:整数   int

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!