RuntimeEnvironment.GetRuntimeDirectory 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回安裝 Common Language Runtime 所在的目錄。
public:
static System::String ^ GetRuntimeDirectory();
public static string GetRuntimeDirectory ();
static member GetRuntimeDirectory : unit -> string
Public Shared Function GetRuntimeDirectory () As String
傳回
含有安裝 Common Language Runtime 所在之目錄路徑的字串。
範例
下列程式碼範例示範如何呼叫 GetRuntimeDirectory 方法。 此程式代碼範例是提供給 類別之較大範例的 RuntimeEnvironment 一部分。
// 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())