开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜