c# get windows version code example
Example 1: c# get os version
// Save the OS info to an variable
OperatingSystem os = Environment.OSVersion;
// Print the OS info to the console
Console.WriteLine($"platform: {os.Platform}\n" +
$"version: {os.Version}\n" +
$"version string: {os.VersionString}");
Example 2: check django version windows
>>> import django
>>> django.VERSION
(2, 0, 0, 'final', 0)
Example 3: get system version
ver && cat /etc/os-release #Show Windows and Unix version respectively