What is the int.MaxValue on a 64-bit PC?

后端 未结 3 1072
暗喜
暗喜 2021-02-12 01:27
System.Console.WriteLine(int.MaxValue);

This line gives me the answer of 2,147,483,647 as I have a 32-bit PC.

Will the answer be s

3条回答
  •  醉梦人生
    2021-02-12 02:13

    int is just an alias for Int32 - it's defined in the C# specification. Therefore int.MaxValue is the same as Int32.MaxValue which will always be 2147483647.

提交回复
热议问题