title: How to have different parts of config file in c#
body: <p>what I am trying to do is for my App.config file i have a bunch of settings, and what i want to do split up my config file into different files. For example; my app.config file file has setting pertaining to emails, so i want to take those settings out and store it in an email.config file and then in my app.config file use the configSource attribute to add thos settings from the email.config file and add it to the app settings node. Is this possible?</p>
  
  <p>If so please advice on how to acheive the above result.</p>
  
  <p>Many thanks.</p>
  
  <p>so for example i have another config file called app1.config and has the following xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;appSettings &gt;
      &lt;add key="l" value="test"/&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>and then from my main app.config file have a reference to the app1.config file and then from code be able to do this to get the value of the app setting key:</p>
  
  <pre><code> var x = ConfigurationManager.AppSettings["l"];
  </code></pre>