tags:

views:

97

answers:

1

Does the results of IntPtr.Size show the OS that the .NET app is running on or which version of .NET Framework that is running? If you have a 32-bit app running on a 64-bit machine using WOW, what will IntPtr.Size show (4 or 8)?

+4  A: 

It returns the bitness of the current process.

Therefore, if your assembly is compiled as x86 only, it will always return 4, even on an x64 OS.

SLaks
So you are saying that it will return 4 since the process is 32-bit, even though it is running on a 64-bit machine?
@user54064 Yes that is what SLaks is saying
ParmesanCodice
Yes. If the process is 32-bit, it will return 4.
SLaks