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

SwitchElementsCollection

using System.Configuration; namespace System.Diagnostics { [ConfigurationCollection(typeof(SwitchElement))] internal sealed class SwitchElementsCollection : ConfigurationElementCollection { public new SwitchElement this[string name] { get { return (SwitchElement)BaseGet(name); } } public override ConfigurationElementCollectionType CollectionType => ConfigurationElementCollectionType.AddRemoveClearMap; protected override ConfigurationElement CreateNewElement() { return new SwitchElement(); } protected override object GetElementKey(ConfigurationElement element) { return ((SwitchElement)element).Name; } } }