IntPtr.Size shows OS version or .NET version?
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)?
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.
精彩评论