Sunday, 27 January 2013

Get .NET CLR Version C#/VB.NET

Get .NET CLR Version C#

This example explains how to get CLR version your program is running ON

            Console.WriteLine("Build={0}",Environment.Version.Build);
            Console.WriteLine("Major={0}",Environment.Version.Major);
            Console.WriteLine("MajorRevision={0}",Environment.Version.MajorRevision);
            Console.WriteLine("Minor={0}",Environment.Version.Minor);
            Console.WriteLine("MinorRevision={0}",Environment.Version.MinorRevision);
            Console.WriteLine("Revision={0}",Environment.Version.Revision);
            Console.WriteLine("CLR VERSION={0}",Environment.Version);

OUTPUT

Major=4
MajorRevision=0
Minor=0
MinorRevision=17929
Revision=17929
CLR VERSION=4.0.30319.17929

Tags:Get .NET CLR Version C#,GET C# CLR VERSION,get asp.net CLR version,get WPF clr version.get Silverlight clr version. get vb.net clr version,