views:

141

answers:

3

Hello,

Is it possible to save some fields in the program, or do I have to write them to a file?

Example:

1) I open a file (with OpenFileDialog) and put it in a FileInfo
2) close the program
3) restart the program
4) go to open -> recent -> select the previous File

Thanks

A: 

you have to put it into a file somwhere... usually you use the configfile for such things. .net manages the work around this configfile very good.

Jack
any examples? (or link to examples)
Phil
see http://www.codeguru.com/columns/DotNet/article.php/c7987/if you use VS you could also use the project settings to generate the configuration that is much easyier to use for the first time.
Jack
+5  A: 

You can use for example the settings file to store the paths to those files(see here)

Then on startup, lookup the path in settings and create a fileinfo

PoweRoy
Yes, Good example.
Ram