title: How to use application config file in C#?
body: <p>I am trying to use a config file in my C# console application. I created the file within the project by going New --> Application Configuration File, and naming it myProjectName.config. My config file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
  &lt;appSettings&gt;
  &lt;add key="SSDirectory" value="D:\Documents and Settings\****\MyDocuments\****" /&gt;
  &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The code to access it looks like this:</p>
  
  <pre><code>private FileValidateUtil()
      {
          sSDirFilePath = ConfigurationSettings.AppSettings["SSDirectory"];
          if (sSDirFilePath == null)
              Console.WriteLine("config file not reading in.");
      }
  </code></pre>
  
  <p>Can anyone lend a hint as to why this is not working? (I am getting the error message.)</p>
  
  <p>Thanks!!</p>
  
  <p>badPanda</p>