保存Properties.Settings时出现问题 [英] Problem in Saving in Properties.Settings

查看:188
本文介绍了保存Properties.Settings时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家

我正在使用代码来保存我的设置(在类库中),没有任何例外,但是我的设置从未更改.
我该怎么办才能解决问题?

hi experts

I''m using the code for saving my settings (in Class Library) not any exceptions but my Settings never change.
What can I do for solve the problem?

Properties.Settings.Default.ProgramTitle = head;
Properties.Settings.Default.PageTitle= title;
Properties.Settings.Default.MaxItemsForShowing = maxItems;
Properties.Settings.Default.MinItemsForShowing = minItems;

Properties.Settings.Default.Save();



它们的范围是用户".



Their scope are "User"

推荐答案

如果这些是用户设置,则它们不在您的应用程序配置文件中,而是在其他位置.如果要重新启动应用程序并再次获取值,则应该看到新值.请检查这些设置是否确实是用户设置,因为无法在运行时更改应用程序设置.
If these are user settings then they are not writing in your application config file but elsewhere. If you were to restart the application and fetch the values again you should see the new values. Check that these setting are indeed user settings because application settings cannot be changed at runtime.


请参阅此链接并检查您的代码.
http://blog.csharphelper. com/2009/12/09/save-and-restore-settings-in-c.aspx
Refer to this Link and Check your code.
http://blog.csharphelper.com/2009/12/09/save-and-restore-settings-in-c.aspx


这篇关于保存Properties.Settings时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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