How can I detect if my app is running on Windows 10

后端 未结 7 1383
清酒与你
清酒与你 2020-12-09 01:17

I\'m looking for a means to detect if my C# app is running on Windows 10.

I had hoped that Environment.OSVersion would do the trick, but this seems to r

7条回答
  •  臣服心动
    2020-12-09 01:58

    Have you tried below? [You need to add a reference to Microsoft.VisulaBasic dll]

    new Microsoft.VisualBasic.Devices.ComputerInfo().OSFullName
    

    On my machine it gives, Microsoft Windows 7 Ultimate

提交回复
热议问题