Поделиться через


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)

Применяется к