在我的 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.