Save user preferences?

D

daniel.divita

I know this has been discussed before, but I really need a good
example of how this works. I am developing an application that houses
some user preferences and also will allow the user to save the entire
project to a file. Instead of creating XML files that will be saved to
a directory, what is the best way to combine all that information into
one binary file? I have read about IsolatedStorage and Serialization,
but the examples I have seen are too vague or don't apply to what I am
doing. Any help is appreciated.

Daniel
 
D

daniel.divita

I know this has been discussed before, but I really need a good
example of how this works. I am developing an application that houses
some user preferences and also will allow the user to save the entire
project to a file. Instead of creating XML files that will be saved to
a directory, what is the best way to combine all that information into
one binary file? I have read about IsolatedStorage and Serialization,
but the examples I have seen are too vague or don't apply to what I am
doing. Any help is appreciated.

Daniel

I found this article which helped:
http://groups.google.com/group/micr...ving+project+isolatedstorage#4fb9098885d4f458

Does anybody else have another suggestion?

Daniel
 
M

Morten Wennevik [C# MVP]

Hi Daniel,

Since that thread was made, .Net 2.0 and Visual Studio 2005 came with a type
safe
settings file directly accessible in code.

http://msdn2.microsoft.com/en-us/library/aa730869(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/cftf714c(VS.80).aspx

IsolatedStorage provides a place to store data even if the user has minimal
security priviliges and works like a regular directory exception you need to
stream everything.

There is also the System.Environment.SpecialFolder folders that provide an
easy way to get user
specific folders.

If you have project data, like a Visual Studio project I would probably go for
System.Environment.SpecialFolder.MyDocuments for the projects and store the
user settings in a settings
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top