开发者

IntPtr.Size shows OS version or .NET version?

开发者 https://www.devze.com 2022-12-25 21:28 出处:网络
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 u

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消