Environment.SystemDirectory 속성

정의

시스템 디렉터리의 정규화된 경로를 가져옵니다.

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

속성 값

String

디렉터리 경로가 포함된 문자열입니다.

예제

다음 예제에서는 코드 예제를 실행하는 컴퓨터의 시스템 디렉터리를 표시합니다. (보안상의 이유로 예제 출력에서 시스템 디렉터리를 생략합니다.)

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

설명

반환되는 값의 예로는 "C:\WINDOWS\System32" 문자열이 있습니다.

적용 대상