I would like to have a configuration section, for example:
<mycollection> <add name="myelement" type="class, assembly" var1="value" var2="value" /> <add name="myelement2" type="class2, assembly" var1="value" var3="value" var4="value" /> </mycollection>
The idea is that the actual ConfigurationElement created is determined by the type value and each element will have its own specific set of attributes.
Another option is that all elements are the same, but they load values ββfrom another section of the configuration, for example:
<mycollection> <add name="myelement" configuration="myothersection" /> <add name="myelement2" configuration="myothersection2" /> </mycollection> <myothersection type="class, assembly" var1="value" var2="value" />
This is easier to implement, but leads to a more detailed configuration file.
Is the first option related to the .NET configuration template, and secondly, is this possible?
source share