Environment.OSVersion
using System; class MainClass { public static void Main(string[] args) { Console.WriteLine("Current OS:\n{0}\n", Environment.OSVersion); } }