Udostępnij za pośrednictwem


RuntimeEnvironment.GetRuntimeDirectory Metoda

Definicja

Zwraca katalog, w którym zainstalowano środowisko uruchomieniowe języka wspólnego.

public:
 static System::String ^ GetRuntimeDirectory();
public static string GetRuntimeDirectory ();
static member GetRuntimeDirectory : unit -> string
Public Shared Function GetRuntimeDirectory () As String

Zwraca

Ciąg zawierający ścieżkę do katalogu, w którym zainstalowano środowisko uruchomieniowe języka wspólnego.

Przykłady

W poniższym przykładzie pokazano wywołanie GetRuntimeDirectory metody . Ten przykład kodu jest częścią większego przykładu udostępnionego RuntimeEnvironment dla klasy .

// Show the path where the CLR was loaded from.
Console::WriteLine("Runtime directory: {0}",
    RuntimeEnvironment::GetRuntimeDirectory());
// Show the path where the CLR was loaded from.
Console.WriteLine("Runtime directory: {0}", RuntimeEnvironment.GetRuntimeDirectory());
' Show the path where the CLR was loaded from.
Console.WriteLine("Runtime directory: {0}", RuntimeEnvironment.GetRuntimeDirectory())

Dotyczy