Properties.Settings.Default.Save();->那个文件在哪里 [英] Properties.Settings.Default.Save(); -> Where is that file
问题描述
我有使用设置"的应用.要保存我使用的设置:
I have app that uses Settings. To save settings I use:
Properties.Settings.Default.Save();
阅读我使用的内容:
Properties.Settings.Default.MyCustomSetting;
在我的应用程序文件夹中,我只有 exe 文件.没有配置文件.我的应用程序运行良好,可以读写设置.
In my folder with application I have only exe file. No config files. My application works good, can read write settings.
如果该文件不在应用程序文件夹中,它位于何处?
Where is that file located if it is not in application folder?
推荐答案
在我的 Windows XP 机器上,设置保存在名为 user.config 的文件中,位于 C:Documents and Settings
或 C:Documents and Settings
On My Windows XP machine, the settings are saved in a file called user.config somewhere under either C:Documents and Settings<UserName>Application Data
or C:Documents and Settings<UserName>Local SettingsApplication Data
更新:
在 Windows Vista 及更高版本上,位置已更改为 C:Users
和 C:Users
On Windows Vista and later, the locations have changed to C:Users<UserName>AppDataRoaming
and C:Users<UserName>AppDataLocal
这篇关于Properties.Settings.Default.Save();->那个文件在哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!