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

ConfigurationCollectionAttribute

Declaratively instructs the .NET Framework to create an instance of a configuration element collection. This class cannot be inherited.
namespace System.Configuration { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] public sealed class ConfigurationCollectionAttribute : Attribute { private string _addItemName; private string _clearItemsName; private string _removeItemName; public Type ItemType { get; } public string AddItemName { get { return _addItemName ?? "add"; } set { if (string.IsNullOrEmpty(value)) value = null; _addItemName = value; } } public string RemoveItemName { get { return _removeItemName ?? "remove"; } set { if (string.IsNullOrEmpty(value)) value = null; _removeItemName = value; } } public string ClearItemsName { get { return _clearItemsName ?? "clear"; } set { if (string.IsNullOrEmpty(value)) value = null; _clearItemsName = value; } } public ConfigurationElementCollectionType CollectionType { get; set; } = ConfigurationElementCollectionType.AddRemoveClearMap; public ConfigurationCollectionAttribute(Type itemType) { if (itemType == (Type)null) throw new ArgumentNullException("itemType"); ItemType = itemType; } } }