Save Settings in a .NET Winforms Application [duplicate]

At some point, the answer boils down to a matter of taste. I’d say you’ll end up with at least these options:

  • store it in the registry, where you have the HKEY_CURRENT_USER key. Everything under it is user-specific. This is usually preferred when you want to store a bunch of small key-value pairs. The main advantage of this system is that your settings are easy to find and share throughout several different applications. To follow this path, you can start from here.
  • using .NET Application settings, provides the easiest way to access your settings at runtime. Again, it’s better for using with key-value pairs of small-sized data. IMO, the main advantages of this method is its simplicity and the fact that it empowers you to use some .NET classes as values (not forcing you to convert everything into more basic types). To follow this path, you can start from here.
  • store it in User Data folders, which are usually hidden under the user’s profile directory. This is preferred when you want to store a large amount of data or any number of files. The main advantage of this method is that you can manipulate your data as you would with any files (that may also be a disadvantage). To follow this path, you can start from here.

Leave a Comment