<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0-preview.4.23259.5" />

Configuration

public sealed class Configuration
Represents a configuration file that is applicable to a particular computer, application, or resource. This class cannot be inherited.

Gets the AppSettingsSection object configuration section that applies to this Configuration object.

public Func<string, string> AssemblyStringTransformer { get; set; }

Specifies a function delegate that is used to transform assembly strings in configuration files.

Gets a ConnectionStringsSection configuration-section object that applies to this Configuration object.

Gets the ContextInformation object for the Configuration object.

public string FilePath { get; }

Gets the physical path to the configuration file represented by this Configuration object.

public bool HasFile { get; }

Gets a value that indicates whether a file exists for the resource represented by this Configuration object.

Gets the locations defined within this Configuration object.

public bool NamespaceDeclared { get; set; }

Gets or sets a value indicating whether the configuration file has an XML namespace.

Gets the root ConfigurationSectionGroup for this Configuration object.

Gets a collection of the section groups defined by this configuration.

Gets a collection of the sections defined by this Configuration object.

public FrameworkName TargetFramework { get; set; }

Gets or sets the targeted version of .NET when a version earlier than the current one is targeted.

public Func<string, string> TypeStringTransformer { get; set; }

Specifies a function delegate that is used to transform type strings in configuration files.

public ConfigurationSection GetSection(string sectionName)

Returns the specified ConfigurationSection object.

public ConfigurationSectionGroup GetSectionGroup(string sectionGroupName)

Gets the specified ConfigurationSectionGroup object.

public void Save()

Writes the configuration settings contained within this Configuration object to the current XML configuration file.

public void Save(ConfigurationSaveMode saveMode)

Writes the configuration settings contained within this Configuration object to the current XML configuration file.

public void Save(ConfigurationSaveMode saveMode, bool forceSaveAll)

Writes the configuration settings contained within this Configuration object to the current XML configuration file.

public void SaveAs(string filename)

Writes the configuration settings contained within this Configuration object to the specified XML configuration file.

public void SaveAs(string filename, ConfigurationSaveMode saveMode)

Writes the configuration settings contained within this Configuration object to the specified XML configuration file.

public void SaveAs(string filename, ConfigurationSaveMode saveMode, bool forceSaveAll)

Writes the configuration settings contained within this Configuration object to the specified XML configuration file.