开发者

c# save directory between sessions

开发者 https://www.devze.com 2023-04-10 22:04 出处:网络
Not really done this before so I wanted a few pointers. In my app, users are able to pick a folder that the application looks in when it is started to pick up some input files.

Not really done this before so I wanted a few pointers.

In my app, users are able to pick a folder that the application looks in when it is started to pick up some input files.

What is the best way to save this information between sessions.

the old fashion way I would have done in the past would be to have a config.ini file and read and write to that the path. However I am sure there are better ways now.

I don't want to have to write to the registary as I want a app that can be installed and uninstalled simple by copying a folder or deleating the folder.

Is there any way to save configuration settings that the uesr can update and remian constant between sessions?

Chee开发者_运维百科rs

Aaron


AFAIK, the way is done now, is by writing these values to the Application.Settings file; however, that's not too different than writing to any XML file and reading it on startup. Either alternative is almost equally simple.


As Icarus said, you need a .settings file. You can specify that settings be Scoped to the User.


You can also look into using IsolatedStorage ( http://msdn.microsoft.com/en-us/library/x7dzh4ws.aspx ).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号