读取操作系统和CLR的版本的C#代码

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

OperatingSystem os = System.Environment.OSVersion;
Console.WriteLine(“Platform: {0}”, os.Platform);
Console.WriteLine(“Service Pack: {0}”, os.ServicePack);
Console.WriteLine(“Version: {0}”, os.Version);
Console.WriteLine(“VersionString: {0}”, os.VersionString);
Console.WriteLine(“CLR Version: {0}”, System.Environment.Version);

Windows 7系统中,输出以下信息
Platform: Win32NT 
Service Pack: 
Version: 6.1.7600.0 
VersionString: Microsoft Windows NT 6.1.7600.0 
CLR Version: 4.0.21006.1