I want to serialize some information I retrieve from the user in a small .NET 3.5 WinForms app
to an XML file saved locally on his computer. Currently all the stations of the users intended
to use this app have Windows 7 on them.
The thing is that the system won’t just let me save the file anywhere, and I need
a place that is both accessible through code (the system will allow saving there),
and preferably is generic enough so that if tomorrow I want to run this app on a different version of Windows this path will still exist.
Any ideas?
Thank you.
You should be able to write to the local Application Data folder.
You can access it from C# as the
Environment.SpecialFolder.LocalApplicationDatafolder.Another option would be
Environment.SpecialFolder.Personal.