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
George GeorgePosted Apr 15, 2008, 11:09 AM
Thanks Alan,
Cool!
regards,
George
AlanPosted Apr 15, 2008, 10:54 AM
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 GeorgePosted Apr 15, 2008, 8:50 AM
Cool, question answered!
regards,
George
jeevan mummadiPosted Apr 15, 2008, 6:23 AM
int is signed 32 bit number,int system type is System.int32
long is signed 64 bit number,long system type is System.int64