Hello everyone,
1.
C# has integer types, int, int32, int64 and long. In my understanding, int32 is always 32-bit, int64 and long are always 64-bit.
My understanding correct?
2.
How about int? Is it 32-bit or 64-bit or depends on how we build application (build as 32-bit? build as 64-bit or any CPU?)
thanks in advance,
George

jeevan mummadi140 reputationPosted Apr 15, 2008, 2:23 AM EDT
int is signed 32 bit number,int system type is System.int32
long is signed 64 bit number,long system type is System.int64
George GeorgeRank #1,736 · 870 reputationPosted Apr 15, 2008, 4:50 AM EDT
Cool, question answered!
regards,
George
AlanRank #669 · 3.6K reputationPosted Apr 15, 2008, 6:54 AM EDT
One thing I've always liked about C# is that the integer types are always the same length no matter what platform you're running on.
This contrasts with the position under C/C++ where the short, int and long types can overlap depending on the platform.
For example, in Win32 programming, int and long are both 4 byte integers. If you want an 8 byte integer, you have to use 'long long' !
George GeorgeRank #1,736 · 870 reputationPosted Apr 15, 2008, 7:09 AM EDT
Thanks Alan,
Cool!
regards,
George