How to fetch key based on values from app.config file?
<p>I have an app.config file like this:-</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;configuration&gt;
  &lt;appSettings&gt;
    &lt;add key="botLogs" value="d:\TFS Projects-BotLogs/"/&gt;
    &lt;add key="botfolder" value="C:\BOTSCONFIG"/&gt;
  &lt;/appSettings&gt;
  &lt;connectionStrings&gt;
    &lt;add connectionString="Server=1.1.1.1;Database=BGAppCrawling;UID=sa;Password=something;" name="VGDB"/&gt;
    &lt;add connectionString="Server=1.1.1.1;Database=BGMappingStaging;UID=sa;Password=something;" name="VGDBMapping"/&gt;
  &lt;/connectionStrings&gt;
&lt;/configuration&gt;
</code></pre>

<p>Now I can fetch values based on keys in appSettings section like this:-</p>

<pre><code>string filePath = ConfigurationSettings.AppSettings["botLogs"].ToString();
</code></pre>

<p>But what is the way if I want to fetch key based on values from appSetting section ?</p>
