ConfigurationElementCollection with a number of ConfigurationElements of different type
Is it possible to have a CollectionElementCollection with a number of different by type CollectionElements, e.g.: <collection> <add type="MyType1, MyLib" Type1SpecificProp="1" /> <add type="MyType2, MyLib" Type2SpecificProp="2" /> </collection I have all classes required for such solution: class MyCollection : ConfigurationElementCollection { } class MyElement : ConfigurationElement { } class MyType1 : MyElement { } class MyType2 : MyElement { } ... etc but when I start my application I'm getting next predictable error: Unrecognized attribute 'Type1SpecificProp'. because Type1SpecificProp is