The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Access Values from App.Config in WPF
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Gowtham RajamanickamPosted Apr 18, 2016, 2:10 AM
very nice
Yaduveer SainiPosted Oct 21, 2015, 7:48 AM
Nice One
XAML AuthoreditedPosted Jan 8, 2010, 8:01 AMEdited Jan 8, 2010, 8:03 AM
One of the big problems with what you're doing is that your app.config isn't normally included in your build so when you deploy your application it's not going to be two directories up from your AppDomain.CurrentDomain.BaseDirectory. When you build your project, the app.config is copied to your output directory and renamed to <build_target>.config (i.e. bin\Debug\ReadWriteConfig.exe.config). Also, the System.Configuration.ConfigurationManager API will let you read and update appSettings without having to locate the configuration file and manually parse its XML contents. Take a look at this article for an example: http://www.codeproject.com/KB/cs/SystemConfiguration.aspx