gpt4 book ai didi

c# - 使用 Environment.OSVersion 确定操作系统

转载 作者:IT王子 更新时间:2023-10-29 04:47:46 26 4
gpt4 key购买 nike

<分区>

确定使用 System.Environment.OSVersion 命名空间的 ASP.NET 应用程序的 Microsoft 操作系统的最佳方法是什么

我需要一个 Windows XP、Windows Server 2003 和 Windows Vista 的示例

这是我试图使用伪代码完成的

switch(/* Condition for determining OS */)
{
case "WindowsXP":
//Do Windows XP stuff
break;
case "Windows Server 2003":
//Do Windows Server 2003 stuff
break;
case "Windows Vista":
//Do Windows Vista stuff
break;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com