c# get framework 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: get system version
ver && cat /etc/os-release #Show Windows and Unix version respectively