Is it possible ( and a good idea ) to use app.config as kind of project file?
I have a small project which needs some settings to be configured at runtime. Because the app.settings creation allows to simply create all configurable items I need for loading automatically at startup, I would like to use this. However, is it possible to use the appconfig mechanism for storing simple project informations, which can 开发者_如何学Cbe loaded on demand ? What I would need then is a simple way of Load/Save the .settings file in the prebuilt Settings structure of my project. Is this possible and if yes, a good idea ?
Yes it good idea to put data in app.config by creating custom section
here is tutorial for you for doing this
How to: Create Custom Configuration Sections Using ConfigurationSection
App.Config and Custom Configuration Sections
精彩评论