MySettings保存在VB 2010 .NET中的哪里?

前端之家收集整理的这篇文章主要介绍了MySettings保存在VB 2010 .NET中的哪里?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
MySettings值保存在程序本身还是存储在注册表中?所以,例如,如果我用一个程序设置一个My.Settings值,那么我将程序本身复制到另一台电脑 – MySettings值是否仍然设置?
这取决于你选择的 scope.有两个范围设置 – 应用程序和用户范围.

从MSDN文章

Application-scoped settings are read-only and are shared between all
users of that application. These settings are stored in the app.config
file in the section. At run time,the app.config
file will be in your bin folder and will be named with your
application’s name (MySettingsDemo.exe.config).

User-scope settings are specific for each user. They can be read and
set safely by the application code at run time. These settings are
stored in a user.config file. To be technically accurate,there are
two user.configs per user per application—one for non-roaming and one
for roaming. Although the Visual Basic 2005 documentation states that
the user.config file will be named according to the user’s name
(joe.config),this is not the case. The user.config file is created in
the:

<c:\Documents and Settings>\<username>\[LocalSettings\]ApplicationData\<companyname>\<appdomainname>_<eid>_<hash>\<verison>.
原文链接:https://www.f2er.com/vb/255740.html

猜你在找的VB相关文章