Mono Class Library: System.Environment Overview | Members

System.Environment.OSVersion Property

Returns a OperatingSystem object that contains details about the current execution platform.

public static OperatingSystem OSVersion { get; }

Value

A OperatingSystem object representing the current platform.

Remarks

C# Example

using System;

class SystemDemo
{
	public static void Main(string[] args)
	{
		Console.WriteLine(Environment.OSVersion);
	}
}
  
prints

Unix 2.6.6.1

on a Linux installation with the 2.6.6.1 kernel.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0