什么是App.config中呢? [英] What is app.config for?
问题描述
Settings.settings
生成 Settings.Designer.cs
其presumably产生的app.config
,然后被复制到输出目录 Foo.exe.config
。当我分发应用程序没有配置文件,没有什么不好的似乎发生。那么,什么是文件?
Settings.settings
generates Settings.Designer.cs
which presumably generates app.config
which then is copied to output directory as Foo.exe.config
. When I distribute the application without the config file, nothing bad seems to happen. So, what is that file for?
推荐答案
如果您还没有配置文件,它使用默认值,从设计师。然而,该配置文件允许用户/管理员可以轻松地更改设置 - 比如你说话的地方,你会想到要存储这些设置服务器,主题等,如果你没有足够的文件,
If you don't have the config file, it uses the default values from the designer. However, the config file allows users/administrators to easily change settings - such as the server you talk to, themes, etc. If you don't have the file, where would you expect those settings to be stored?
您可以为每个用户设置以及每个应用程序的设置,这些设置存储在不同位置。
You can have per-user settings as well as per-application settings, which are stored in different locations.
这篇关于什么是App.config中呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!