title: How do read connection string created by the settings file?
body: <p>When I just had an app.config, everytime I tried ConfigurationManager.AppSettings[0] or ConfigurationManager.AppSettings["keyName"] I got a null. So I tried to use a *.settings file which created me an app.config that looked like this</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;configSections&gt;
      &lt;sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" &gt;
        &lt;section name="IndexLoader.IndexLoader" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;/sectionGroup&gt;
    &lt;/configSections&gt;
    &lt;applicationSettings&gt;
      &lt;IndexLoader.IndexLoader&gt;
        &lt;setting name="ConnectionString" serializeAs="String"&gt;
          &lt;value&gt;INITIAL CATALOG=xxx;DATA SOURCE=xxx;User ID=xxx;Password=xxx;Application Name=xxx;&lt;/value&gt;
        &lt;/setting&gt;
      &lt;/IndexLoader.IndexLoader&gt;
    &lt;/applicationSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Now how do I read this connection string using C#?</p>
  
  <p>The solution has multiple projects and many of them have config files. Is there a way to specify that I want the config file in code's project to be used?</p>