Environment.Version-Eigenschaft
Ruft ein Version-Objekt ab, das die Nummern für Haupt- und Nebenversion, Build und Revision der Common Language Runtime beschreibt.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared ReadOnly Property Version As Version
'Usage
Dim value As Version
value = Environment.Version
public static Version Version { get; }
public:
static property Version^ Version {
Version^ get ();
}
/** @property */
public static Version get_Version ()
public static function get Version () : Version
Eigenschaftenwert
Ein Version-Objekt.
Beispiel
Im folgenden Codebeispiel wird die Version der Common Language Runtime angezeigt. (Die Version wird in der Ausgabe des Codebeispiels aus Sicherheitsgründen weggelassen.)
' Sample for the Environment.Version property
Imports System
Class Sample
Public Shared Sub Main()
Console.WriteLine()
Console.WriteLine("Version: {0}", Environment.Version.ToString())
End Sub 'Main
End Class 'Sample
'
'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 "!---OMITTED---!".)
'
'Version: !---OMITTED---!
'
// Sample for the Environment.Version property
using System;
class Sample
{
public static void Main()
{
Console.WriteLine();
Console.WriteLine("Version: {0}", Environment.Version.ToString());
}
}
/*
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 "!---OMITTED---!".)
Version: !---OMITTED---!
*/
// 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---!
*/
// Sample for the Environment.Version property
import System.*;
class Sample
{
public static void main(String[] args)
{
Console.WriteLine();
Console.WriteLine("Version: {0}",
System.Convert.ToString(Environment.get_Version()));
} //main
} //Sample
/*
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 "!---OMITTED---!".)
Version: !---OMITTED---!
*/
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0