我要检测的Windows 8操作系统在我的C#Windows应用程序,并做一些设置。我知道我们可以使用检测到Windows 7 Environment.OSVersion
,却怎么也的Windows 8进行检测?
在此先感谢。
解决方案 版本win8version =新版本(6,2,9200,0);
如果(Environment.OSVersion.Platform == PlatformID.Win32NT和放大器;&安培;
Environment.OSVersion.Version> = win8version)
{
//它的Win8或更高。
}
I have to detect Windows 8 Operating system in my C# Windows Application and do some settings. I know we can detect Windows 7 using Environment.OSVersion
, but how can windows 8 be detected?
Thanks in advance.
解决方案Version win8version = new Version(6, 2, 9200, 0);
if (Environment.OSVersion.Platform == PlatformID.Win32NT &&
Environment.OSVersion.Version >= win8version)
{
// its win8 or higher.
}
上一篇:WPF web浏览器的LoadCompleted事件浏览器、事件、WPF、web
下一篇:SNIReadSyncOverAsync和WaitForSingleObject的阻塞EF表现?SNIReadSyncOverAsync、WaitForSingleObject、EF