如何读/写设置(使用.ini,xml,等等)? [英] how to read/write settings (using .ini, xml, whatever)?
问题描述
我想读/写用户设置。我想过使用.ini
或.xml文件。是否有c#中的类来处理这个问题?我在网上找到的东西看起来很旧。
Titan
5月30日上午8:49,titan nyquist< titan.nyqu ... @ gmail.comwrote:
我想要读/写用户设置。我想过使用.ini
或.xml文件。是否有c#中的类来处理这个问题?我在网上找到的东西看起来很旧。
如果你使用vs 2005,你可以打开Project属性,点击
设置选项卡。您应该获得创建设置的链接。
将应用程序和用户设置放在那里。你可以通过
Properties.Resources.Default使用它们。
HTH
Andy
有了这个,可以创建一个GUI来让用户更改这些设置吗?
如何从一个会话保存到下一个会话(从一次运行
计划到下一次)?
5月30日下午3:53,Andy< a ... @ med-associates.comwrote:
5月30日上午8:49,titan nyquist< titan.nyqu ... @ gmail.comwrote:
我想读/写用户设置。我想过使用.ini
或.xml文件。是否有c#中的类来处理这个问题?我在网上找到的东西看起来很旧。
如果你使用vs 2005,你可以打开Project属性,点击
设置选项卡。您应该获得创建设置的链接。
将应用程序和用户设置放在那里。你可以通过
Properties.Resources.Default使用它们。
HTH
Andy
您好,
您需要存储什么样的设置?
Moty
I want to read/write user settings. I thought about using .ini
or .xml files. Are there classes in c# to handle this? The stuff I
find on the ''net seems old.
Titan
On May 30, 8:49 am, titan nyquist <titan.nyqu...@gmail.comwrote:I want to read/write user settings. I thought about using .ini
or .xml files. Are there classes in c# to handle this? The stuff I
find on the ''net seems old.If you''re using vs 2005, you can open the Project properties, click on
the Settings tab. You should get a link offering to create settings.
Put application and user settings in there. YOu can then use them via
Properties.Resources.Default.
HTH
Andy
With that, can create a GUI to let the user change these settings?
How are the saved from one session to the next (from one run of the
program to the next time)?
On May 30, 3:53 pm, Andy <a...@med-associates.comwrote:On May 30, 8:49 am, titan nyquist <titan.nyqu...@gmail.comwrote:
I want to read/write user settings. I thought about using .ini
or .xml files. Are there classes in c# to handle this? The stuff I
find on the ''net seems old.
If you''re using vs 2005, you can open the Project properties, click on
the Settings tab. You should get a link offering to create settings.
Put application and user settings in there. YOu can then use them via
Properties.Resources.Default.
HTH
AndyHi,
What kind of settings do you need to store?
Moty
这篇关于如何读/写设置(使用.ini,xml,等等)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!