Environment.SystemDirectory Proprietà

Definizione

Recupera il percorso completo della directory di sistema.

public:
 static property System::String ^ SystemDirectory { System::String ^ get(); };
public static string SystemDirectory { get; }
member this.SystemDirectory : string
Public Shared ReadOnly Property SystemDirectory As String

Valore della proprietà

String

Stringa che contiene un percorso di directory.

Esempio

Nell'esempio seguente viene visualizzata la directory di sistema del computer che esegue l'esempio di codice. La directory di sistema viene omessa dall'output di esempio per motivi di sicurezza.

// 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
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
open System

//  <-- Keep this information secure! -->
printfn $"\nSystemDirectory: {Environment.SystemDirectory}"

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

Commenti

Un esempio del valore restituito è la stringa "C:\WINDOWS\System32".

Si applica a