【发布时间】:2010-09-25 02:20:36
【问题描述】:
在.NET 2.0 C# 应用程序中,我使用以下代码检测操作系统平台:
string os_platform = System.Environment.OSVersion.Platform.ToString();
这将返回“Win32NT”。问题是即使在 64 位 Windows Vista 上运行它也会返回“Win32NT”。
还有其他方法可以知道正确的平台(32 位还是 64 位)?
请注意,在 Windows 64 位上作为 32 位应用程序运行时,它也应该检测 64 位。
【问题讨论】:
标签: c# windows 64-bit .net-2.0 platform-detection