Search code examples
c#visual-studioapplication-settings

How can I save user settings on a per user basis?


I'm working on a program that needs a feature that has similar functionality as a contact list. I need to have user settings, but I don't know how, if it's even possible, to create application settings in code.

I would like to be able to add as many new "contact" settings as needed, so I figured if I couldn't create new settings, I should just have one setting that is a list, but that also doesn't seem to be possible. I've looked around on here and Google and can't find anything to fit my needs.

Requirements: Store contact-like data such as phone numbers, email addresses, etc. Be able to add as many of these contact settings as needed. Everything in one executable file.

Edit: So there's the object data type, which seems to fit my needs. Is there a reason this wasn't an answer to any of the very similar questions to mine? It seems to be perfect..

Edit: Nevermind, seems to be compiler errors when trying to access a property of my object because it doesn't have that property until it's an instance of my own objects...


Solution

  • With JayP. Sql Server Compact might also be a possibility, it creates a local 'mini' database, without the need of a sql server installation.