请问如何用C#判断操作系统是简体、繁体、英文?
2 回答
暮色呼如
TA贡献1853条经验 获得超9个赞
using System.Runtime.InteropServices;
static void Main(string[] args)
{
System.Console.WriteLine(System.Environment.OSVersion);
System.Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentCulture.ThreeLetterWindowsLanguageName);
System.Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentCulture.NativeName);
System.Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentCulture.Name);
System.Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentCulture.DisplayName);
Console.ReadKey();
}
- 2 回答
- 0 关注
- 728 浏览
添加回答
举报
0/150
提交
取消