System.Environment.OSVersion returns wrong version

后端 未结 3 584
旧巷少年郎
旧巷少年郎 2020-12-30 20:41

Using windows 10, upgraded from windows 8 => 8.1 => 10 When I use this code.

OperatingSystem os = System.Environment.OSVersion;

The os.Vers

3条回答
  •  没有蜡笔的小新
    2020-12-30 21:22

    Try:

    new ComputerInfo().OSVersion;

    Output:

    Microsoft Windows 10 Enterprise

    Note: Add reference to Microsoft.VisualBasic.Devices;

    Thanks to https://stackoverflow.com/a/39888998/6629672

提交回复
热议问题