title: How to avoid hardcoding strings
body: <p>This is a question regarding best coding practices.
  I would like to know the consensus about how to best avoid hardcoding strings and values in a .NET application.
  What I've seen so far where I have previously worked:</p>
  
  <ul>
  <li>using resource .resx files</li>
  <li>storing these values and strings in App.config or web.config</li>
  <li><p>making a static class ApplicationStrings and declaring all the strings and values in there:</p>
  
  <pre><code>public static class ApplicationStrings
  {
      #region constants
      public const string APPLICATION_NAME = "X";
      public const string APPLICATION_RESOURCEMANAGER_NAME = "ResourceManagerX";
      public const string APPLICATION_DEFAULT_LOGFILENAME = "log.txt";
  }
  </code></pre></li>
  </ul>
  
  <p>However, is not the 3rd method, just another hardcode? Does it make sense to have such a class? The benefit would be that all strings are in one place, but is that really avoiding a hardcode?</p>
  
  <p>Also, if you have developed other habits for this situation, feel free to post.</p>