The ConfigurationSection
examples I have found online (for example) all have code that looks like this:
public class ConnectionSection : ConfigurationSection
{
[ConfigurationProperty("Servers")]
public ServerAppearanceCollection ServerElement
{
get { return ((ServerAppearanceCollection)(base["Servers"])); }
set { base["Servers"] = value; }
}
}
Why is it accessing the value "Servers" from the base using the square brackets? Is the setter used when creating this object from the xml, or is the setter used to overwrite the value in the xml file? If so, why is the attribute set on this property?