title: Read all key values from app.config c#
body: <p>Hi i have the following app.config file </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;configuration&gt;
  &lt;appSettings&gt;
  &lt;add key="DayTime" value="08-20" /&gt;
  &lt;add key="NightTime" value="20-08" /&gt;
  &lt;add key="ClientSettingsProvider.ServiceUri" value="" /&gt;
  &lt;add key="GridMode" value="1"/&gt; 
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>I need to read all the keys at one shot and store it some where like <code>Dictionary</code>. </p>
  
  <p>I have tried following code but give me <code>null</code> value</p>
  
  <p>with exception <code>Cannot convert Keyvalueinternalcollection to hashtable</code></p>
  
  <pre><code>var section = ConfigurationManager.GetSection("appSettings") as Hashtable;
  </code></pre>
  
  <p>How to read all keys with their values ?</p>