title: how to get value from appSettings for given config file using c# winform?
body: <p>I'm giving <code>.config</code> file path and i want to retrieve appSetting value for <code>key=MYDATA</code> from that given <code>.config</code> file.</p>
  
  <p>I tried following code but not getting expected.</p>
  
  <pre><code>//System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
  
          //var classLibrary1AppSettings = (System.Collections.Specialized.NameValueCollection)System.Configuration.ConfigurationManager.GetSection("appSettings");
  
          //config.AppSettings.File = "C:\\mydemo\\web.config";
  </code></pre>
  
  <blockquote>
    <p>want to get value for <code>key=MYDATA</code></p>
  </blockquote>