There's a good article on creating a custom configuration section handler that loads values โโin a list here .
Basically, your IConfigurationSectionHandler Create method should look something like this:
public object Create(object parent, object configContext, XmlNode section) { IList<string> illegal = new List<string>(); XmlNodeList processesNodes= section.SelectNodes("CustomCollection"); foreach (XmlNode child in processesNodes) { illegal.Add(child.Attributes["value"].InnerText); } return illegal; }
source share