How to use App.Config in WPF applications
When you create a WPF application it doesn't have a config file like ASP.NET websites do, but with a couple of steps you can add one and access it, here's how.
|
- Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
- cfa.AppSettings.Settings["xmlDataDirectory"].Value = "WANGLICHAO";
- cfa.Save();