Freigeben über


Environment.SystemDirectory-Eigenschaft

Ruft den voll gekennzeichneten Pfad des Systemverzeichnisses ab.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared ReadOnly Property SystemDirectory As String
'Usage
Dim value As String

value = Environment.SystemDirectory
public static string SystemDirectory { get; }
public:
static property String^ SystemDirectory {
    String^ get ();
}
/** @property */
public static String get_SystemDirectory ()
public static function get SystemDirectory () : String

Eigenschaftenwert

Eine Zeichenfolge mit einem Verzeichnispfad.

Hinweise

Ein Beispiel für den zurückgegebenen Wert ist die Zeichenfolge "C:\WinNT\System32".

Beispiel

Im folgenden Codebeispiel wird der Name des Systemverzeichnisses des Computers angezeigt, auf dem das Codebeispiel ausgeführt wird. (Das Systemverzeichnis wird in der Ausgabe des Codebeispiels aus Sicherheitsgründen weggelassen.)

' Sample for the Environment.SystemDirectory property
Imports System

Class Sample
   Public Shared Sub Main()
      Console.WriteLine()
      '  <-- Keep this information secure! -->
      Console.WriteLine("SystemDirectory: {0}", Environment.SystemDirectory)
   End Sub 'Main
End Class 'Sample
'
'This example produces the following results:
'
'SystemDirectory: C:\WINNT\System32
'
// Sample for the Environment.SystemDirectory property
using System;

class Sample 
{
    public static void Main() 
    {
    Console.WriteLine();
//  <-- Keep this information secure! -->
    Console.WriteLine("SystemDirectory: {0}", Environment.SystemDirectory);
    }
}
/*
This example produces the following results:

SystemDirectory: C:\WINNT\System32
*/
// Sample for the Environment::SystemDirectory property
using namespace System;
int main()
{
   Console::WriteLine();
   
   //  <-- Keep this information secure! -->
   Console::WriteLine( "SystemDirectory: {0}", Environment::SystemDirectory );
}

/*
This example produces the following results:

SystemDirectory: C:\WINNT\System32
*/
// Sample for the Environment.SystemDirectory property

import System.*;

class Sample
{
    public static void main(String[] args)
    {
        Console.WriteLine();
        //  <-- Keep this information secure! -->
        Console.WriteLine("SystemDirectory: {0}", 
            Environment.get_SystemDirectory());
    } //main
} //Sample

/*
This example produces the following results:

SystemDirectory: C:\WINDOWS\System32
*/

.NET Framework-Sicherheit

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

Siehe auch

Referenz

Environment-Klasse
Environment-Member
System-Namespace