<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0-rc.1.20451.14" />

NameValueConfigurationElement

A configuration element that contains a String name and String value. This class cannot be inherited.
namespace System.Configuration { public sealed class NameValueConfigurationElement : ConfigurationElement { private static readonly ConfigurationProperty s_propName = new ConfigurationProperty("name", typeof(string), string.Empty, ConfigurationPropertyOptions.IsKey); private static readonly ConfigurationProperty s_propValue = new ConfigurationProperty("value", typeof(string), string.Empty, ConfigurationPropertyOptions.None); private static readonly ConfigurationPropertyCollection s_properties = new ConfigurationPropertyCollection { s_propName, s_propValue }; protected internal override ConfigurationPropertyCollection Properties => s_properties; [ConfigurationProperty("name", IsKey = true, DefaultValue = "")] public string Name { get { return (string)base[s_propName]; } } [ConfigurationProperty("value", DefaultValue = "")] public string Value { get { return (string)base[s_propValue]; } set { base[s_propValue] = value; } } internal NameValueConfigurationElement() { } public NameValueConfigurationElement(string name, string value) { base[s_propName] = name; base[s_propValue] = value; } } }