Aracılığıyla paylaş


Environment.SystemDirectory Özellik

Tanım

Sistem dizininin tam yolunu alır.

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

Özellik Değeri

String

Dizin yolu içeren bir dize.

Örnekler

Aşağıdaki örnek, kod örneğini çalıştıran bilgisayarın sistem dizinini görüntüler. (Sistem dizini, güvenlik nedeniyle örnek çıktıdan atlanır.)

// 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
'

Açıklamalar

Döndürülen değere örnek olarak "C:\WINDOWS\System32" dizesi gösteriliyor.

Şunlara uygulanır