
Hi, today im going to show you the easy way to get the OS version in C#. So Fire up Visual Studio and select new Console application project and Name in GetOSVersion.
Add a reference to Microsoft.VisualBasic assembly.
Add Namespace //Import Namespace
using Microsoft.VisualBasic.Devices;
Add below code in program class static void Main(string[] args)
{
//Create a new instance of computer class
...