共用方式為


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)

適用於