相关疑难解决方法(0)

如何使用.NET检测Windows 64位平台?

.NET 2.0 C#应用程序中,我使用以下代码来检测操作系统平台:

string os_platform = System.Environment.OSVersion.Platform.ToString();
Run Code Online (Sandbox Code Playgroud)

这将返回"Win32NT".问题是,即使在Windows Vista 64位上运行,它也会返回"Win32NT".

有没有其他方法可以知道正确的平台(32或64位)?

请注意,在Windows 64位上作为32位应用程序运行时,它还应检测64位.

c# windows 64-bit .net-2.0 platform-detection

258
推荐指数
14
解决办法
19万
查看次数

标签 统计

.net-2.0 ×1

64-bit ×1

c# ×1

platform-detection ×1

windows ×1