Export (0) Print
Expand All

RuntimeEnvironment.GetRuntimeDirectory Method

Returns the directory where the common language runtime is installed.

Namespace:  System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public static string GetRuntimeDirectory()

Return Value

Type: System.String
A string that contains the path to the directory where the common language runtime is installed.

The following example demonstrates calling the GetRuntimeDirectory method. This code example is part of a larger example provided for the RuntimeEnvironment class.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft