Difference between long and int in C#?

后端 未结 6 742
日久生厌
日久生厌 2021-02-03 17:40

What is the actual difference between a long and an int in C#? I understand that in C/C++ long would be 64bit on some 64bit platforms(depending on OS o

6条回答
  •  眼角桃花
    2021-02-03 18:32

    In C#, an int is a System.Int32 and a long is a System.Int64; the former is 32-bits and the later 64-bits.

    C++ only provides vague guarantees about the size of int/long, in comparison (you can dig through the C++ standard for the exact, gory, details).

提交回复
热议问题