0

I'm writing a client for multiple websites. For these websites, users should be able to save multiple settings, like username, favorite category etc. I want these settings to be saved locally. At first i thought i'd use the usual Properties.Settings, but i want these strings to be in a database of some sort, to keep them ordered. Like so:

Website, User, UserCat, Proxy

Those are all the columns i need, proxy is optional. What is the best way to go about this? I first thought of stringcollections, but the coding is messy and it just doesn't seem like the right way to go.

When my application starts, a user can select one website, and the app will load the user, usercat and the optional proxy belonging to that website. Whats the best way to handle this? Thanks!

Michiel
  • 468
  • 3
  • 23
  • You can use a `StringCollection` in this way: http://stackoverflow.com/questions/10419116/store-string-array-in-appsettings/10419321#10419321 – Tim Schmelter Apr 13 '13 at 21:00

1 Answers1

0

If you don't want to store these settings in Properties.Settings then the other two options that come into mind are SQLite - http://sqlite.phxsoftware.com or writing to flat files (.ini or your own custom format).

Daniel
  • 167
  • 2
  • 3
  • 9
  • The problem is not in using Properties.Settings, the problem is that it's not clear to me in which format this data is handled correctly. I can't store tables in Properties.Settings, so there has to be a cleaner way. Right? – Michiel Apr 13 '13 at 21:08
  • You can store custom types in Properties.Settings as long as they are serializable. But some require work: http://blogs.msdn.com/b/johan_stenbergs_blog/archive/2005/11/17/494163.aspx – Matthew Watson Apr 13 '13 at 21:12