简体   繁体   中英

C#/WPF: Save User Settings in Ressource file

有没有办法将用户设置保存在Ressource-File或类似的文件中,因为我希望用户看不到.xml-File。

I would recommend your applications .config file or resource files for application specific settings. This is the common way of doing things.

WPF Resources

ConfigurationManager

The normal way to do this is to use a standard .settings file with settings set to user scope. While these files are stored as XML, they are hidden by default in the AppData folder of each user. In my opinion, any user that can work out where their settings file is stored is welcome to change them.

Please take a look at the Using Settings in C# page on MSDN for full details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM