title: Variables within app.config/web.config
body: <p>Is it is possible to do something like the following in the <code>app.config</code> or <code>web.config</code> files?</p>
  
  <pre><code>&lt;appSettings&gt;
   &lt;add key="MyBaseDir" value="C:\MyBase" /&gt;
   &lt;add key="Dir1" value="[MyBaseDir]\Dir1"/&gt;
   &lt;add key="Dir2" value="[MyBaseDir]\Dir2"/&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>I then want to access Dir2 in my code by simply saying:</p>
  
  <pre><code> ConfigurationManager.AppSettings["Dir2"]
  </code></pre>
  
  <p>This will help me when I install my application in different servers and locations wherein I will only have to change ONE entry in my entire <code>app.config</code>.
  (I know I can manage all the concatenation in code, but I prefer it this way).</p>