What is the difference between Settings and Resource?

Asked

Viewed 41 times

1

Settings saves user preferences for the color scheme of an application for example and the Resource is for the same thing ?

When should I wear Settings and when to use Resource in the Winforms application ?

1 answer

3


The big difference is that when using Resource after changing some value, add or remove a key, you need to recompile the application. Then Resources should be used for more "static" content such as texts, Abels and other items presented in the UI, especially when there are variations in culture (several languages). That is, it should be used for the presentation of resources related to the core of your application.

Already through Settings you have greater flexibility for settings relating to a distribution for more dynamic customizations in relation to user preferences or what you intend to change to a specific client without relying on a redistribution of your application. There are other system variables, such as connection strings, directory mapping, etc.

In your case, if the goal is to allow the user to choose a predefined core palette, these themes may be in the Resource and you keep in Settings which theme was chosen.

  • Where is the Resource stored? After software installation.

  • 1

    It is compiled together with the application

Browser other questions tagged

You are not signed in. Login or sign up in order to post.