Properties.Settings.Default.Save();->那个文件在哪里 [英] Properties.Settings.Default.Save(); -> Where is that file

查看:26
本文介绍了Properties.Settings.Default.Save();->那个文件在哪里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用设置"的应用.要保存我使用的设置:

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;Application DataC:Documents and SettingsLocal SettingsApplication Data

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:UsersAppDataRoamingC:UsersAppData本地

On Windows Vista and later, the locations have changed to C:Users<UserName>AppDataRoaming and C:Users<UserName>AppDataLocal

这篇关于Properties.Settings.Default.Save();-&gt;那个文件在哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆