int/Int32/Int64 on 64-bit Processors and 64-bit OS.

  • Thread starter Thread starter mehdi
  • Start date Start date
M

mehdi

Hi folks,
I would like to know whether the "int" data type (in .NET Framework)
is considered as Int32 on 64bit processors too? Any help would be
highly appreciated,

Cheers,
Mehdi
 
Yes; int is defined in the C# language specification as Int32; it does
not depend on the processor.

IntPtr, on the otherhand, changes for each runtime - which means you
can let the system deal with this abstraction, without worrying about
your "int" code changing behavior.

Marc
 
Mehdi,

Unlike c++ where the int is platform dependant in C# the type sizes are
stirctly fixed (except IntPtr, which depends on the machine word).
int is Int32
 
Back
Top