get operating system info
Published: 5. January 2009 | Updated: 27. October 2011License: Microsoft Public License (MS-PL)
Categories: Windows
Tags: C# Windows
Getting information about actual OS
Console.WriteLine(Environment.OSVersion); Console.WriteLine("Platform: {0}", Environment.OSVersion.Platform.ToString()); Console.WriteLine("Version: {0}", Environment.OSVersion.Version.ToString()); Console.WriteLine("Service pack: {0}", Environment.OSVersion.ServicePack);Console Output:
Microsoft Windows NT 5.2.3790 Service Pack 2
Platform: Win32NT
Version: 5.2.3790.131072
Service pack: Service Pack 2
Platform: Win32NT
Version: 5.2.3790.131072
Service pack: Service Pack 2
| Send us feedback about this snippet » |





