Does IntPtr.Size show OS version or .NET version?

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

+4
source share
1 answer

It returns the bit of the current process.

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

+6
source

Source: https://habr.com/ru/post/1306362/


All Articles