<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" />

ConfigurationManager

public static class ConfigurationManager
Provides access to configuration files for client applications. This class cannot be inherited.
public static NameValueCollection AppSettings { get; }

Gets the AppSettingsSection data for the current application's default configuration.

Gets the ConnectionStringsSection data for the current application's default configuration.

public static object GetSection(string sectionName)

Retrieves a specified configuration section for the current application's default configuration.

Opens the configuration file for the current application as a Configuration object.

public static Configuration OpenExeConfiguration(string exePath)

Opens the specified client configuration file as a Configuration object.

Opens the machine configuration file on the current computer as a Configuration object.

Opens the specified client configuration file as a Configuration object that uses the specified file mapping and user level.

Opens the specified client configuration file as a Configuration object that uses the specified file mapping, user level, and preload option.

Opens the machine configuration file as a Configuration object that uses the specified file mapping.

public static void RefreshSection(string sectionName)

Refreshes the named section so the next time that it is retrieved it will be re-read from disk.