Customize the following app.config in C#?
<p>I have to parse several comma-separated files containing headers via a generic parser. The headers come in great number, and I need to provide the ability to choose the few headers that matter. </p>

<p>The concrete parsers that implement my generic one for each file type have to override an onLine(IDictionary|string,string| line) method among others. This line maps header value to corresponding data in the line.</p>

<p>My problem : I use a comma-separated list in my app.config at the moment. The problem of that is that my concrete parsers will have to use actual header values as keys. I'd like to be able to introduce constants, so that no rebuild is necessary in case a header changes.</p>

<p>at the moment my app.config looks like this :</p>

<pre><code>  &lt;configSections&gt;
    ...
    &lt;section name="headers" type="System.Configuration.NameValueSectionHandler" /&gt;
    ...
  &lt;/configSections&gt;
  ...
  &lt;headers&gt;
    ...
    &lt;add key="file1" value="actualheader1,actualheader2,actualheader3" /&gt;
    &lt;add key="file2" value="actualheader4,actualheader5,actualheader6" /&gt;
    &lt;add key="file3" value="actualheader7,actualheader8,actualheader9" /&gt;
    ...
  &lt;/headers&gt;
  ...
</code></pre>

<p>I would need something like (no requirements in terms of what is tag, key, value, just trying to show the logic I am after):</p>

<pre><code>  &lt;configSections&gt;
    ...
    &lt;section name="headers" type="?" /&gt;
    ...
  &lt;/configSections&gt;
  ...
  &lt;headers&gt;
    ...
    &lt;file1&gt;
      &lt;add key="headerconstant1" value="actualheader1" /&gt;
      &lt;add key="headerconstant2" value="actualheader2" /&gt;
      &lt;add key="headerconstant3" value="actualheader3" /&gt;
    &lt;/file1&gt;
    &lt;file2&gt;
      &lt;add key="headerconstant4" value="actualheader4" /&gt;
      &lt;add key="headerconstant5" value="actualheader5" /&gt;
      &lt;add key="headerconstant6" value="actualheader6" /&gt;
    &lt;/file2&gt;
    &lt;file3&gt;
      &lt;add key="headerconstant7" value="actualheader7" /&gt;
      &lt;add key="headerconstant8" value="actualheader8" /&gt;
      &lt;add key="headerconstant9" value="actualheader9" /&gt;
    &lt;/file3&gt;
    ...
  &lt;/headers&gt;
  ...
</code></pre>

<p>The second option would enable changes in the actual header value to find in files without impacting the code.</p>

<p>How can I do this ? I there any quickfix already implemented ?</p>
