RuntimeEnvironment.SystemConfigurationFile 属性

定义

注意

RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.

获取系统配置文件的路径。

public:
 static property System::String ^ SystemConfigurationFile { System::String ^ get(); };
public static string SystemConfigurationFile { get; }
[System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static string SystemConfigurationFile { get; }
static member SystemConfigurationFile : string
[<System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member SystemConfigurationFile : string
Public Shared ReadOnly Property SystemConfigurationFile As String

属性值

系统配置文件的路径。

属性

例外

仅限 .NET Core 和 .NET 5 及更高版本:在所有情况下。

示例

下面的代码示例演示 了 SystemConfigurationFile 属性。 此代码示例是为 RuntimeEnvironment 类提供的一个更大示例的一部分。

// Show the path of the machine's configuration file.
Console::WriteLine("System configuration file: {0}",
    RuntimeEnvironment::SystemConfigurationFile);
// Show the path of the machine's configuration file.
Console.WriteLine("System configuration file: {0}", RuntimeEnvironment.SystemConfigurationFile);
' Show the path of the machine's configuration file.
Console.WriteLine("System configuration file: {0}", RuntimeEnvironment.SystemConfigurationFile)

适用于