This documentation is archived and is not being maintained.
Environment::Version Property
Visual Studio 2010
Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System::VersionAn object that displays the version of the common language runtime.
For more information about the version of the common language runtime that is installed with each version of the .NET Framework, see .NET Framework Versions and Dependencies.
The following example displays the version of the common language runtime. (The version is omitted from the example output for security reasons.)
// Sample for the Environment::Version property using namespace System; int main() { Console::WriteLine(); Console::WriteLine( "Version: {0}", Environment::Version ); } /* This example produces the following results: (Any result that is lengthy, specific to the machine on which this sample was tested, or reveals information that should remain secure, has been omitted and marked S"!---OMITTED---!".) Version: !---OMITTED---! */
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: