<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0-preview.3.21201.4" />

DefaultSection

public sealed class DefaultSection : ConfigurationSection
Represents a basic configuration-section handler that exposes the configuration section's XML for both read and write access.
using System.Xml; namespace System.Configuration { public sealed class DefaultSection : ConfigurationSection { private static volatile ConfigurationPropertyCollection s_properties; private bool _isModified; private string _rawXml = string.Empty; protected internal override ConfigurationPropertyCollection Properties => EnsureStaticPropertyBag(); public DefaultSection() { EnsureStaticPropertyBag(); } private static ConfigurationPropertyCollection EnsureStaticPropertyBag() { if (s_properties == null) { ConfigurationPropertyCollection configurationPropertyCollection = s_properties = new ConfigurationPropertyCollection(); } return s_properties; } protected internal override bool IsModified() { return _isModified; } protected internal override void ResetModified() { _isModified = false; } protected internal override void Reset(ConfigurationElement parentSection) { _rawXml = string.Empty; _isModified = false; } protected internal override void DeserializeSection(XmlReader xmlReader) { if (!xmlReader.Read() || xmlReader.NodeType != XmlNodeType.Element) throw new ConfigurationErrorsException(System.SR.Config_base_expected_to_find_element, xmlReader); _rawXml = xmlReader.ReadOuterXml(); _isModified = true; } protected internal override string SerializeSection(ConfigurationElement parentSection, string name, ConfigurationSaveMode saveMode) { return _rawXml; } } }