问题描述
我正在开发一个应用程序,需要跟踪多个条目并将它们保存在下一次应用程序中.简而言之,我想为我的应用程序设置一个设置部分.现在,我一直在尝试其他事情,例如配置文件"条目和app.config.
任何人都可以通过向我推荐一些好的教程来指导我,因为我已经在互联网上搜索了,但没有找到满足我需求的东西.
问候,
法鲁克·贾维德
从OP的答案移到:
我认为,我在解释这个问题时可能犯了一个小错误.我要做的是保存一些有关用户的信息,这些信息他可以随时更改.
例如,我想保存客户端的默认用户名和密码,但是从他的多个帐户中,用户可以选择其中的任何一个,这样,新条目将替换之前的条目.
非常感谢您的支持.
Hi,
I am developing an application where I need to keep track of multiple entries and keep them saved in the application for the next time. In short, I want to make a settings section for my application. Now, I have been trying out different things like Config File entries and app.config.
Can anyone guide me by suggesting me some good tutorial because I have already searched the internet but have found nothing to fulfill my demand.
Regards,
Farrukh Javeid
Moved from Answer by OP:
I think, I might have made a little mistake in explaining the problem. What I want to do is to save some information about the user that he can alter at anytime.
For example, I want to save the default username and password of the client but out of his muliple accounts, the user can select any of them and from so on that new entry will replace the previous one.
Thank you very much for your support friends.
推荐答案
string s = Properties.Settings.Default.MySetting;
5)编写设置:
5) To write your setting:
Properties.Settings.Default.MySetting = "My new setting value";
Properties.Settings.Default.Save();
这篇关于应用程序设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!