RubenHerman
RubenHerman

Reputation: 1854

Save file info in program c#

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

Upvotes: 0

Views: 1866

Answers (3)

RvdK
RvdK

Reputation: 19790

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

Upvotes: 5

Jack
Jack

Reputation: 292

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.

Upvotes: 0

Related Questions