Where to store application settings

I am creating an application that reads some information on a scale through the RS232 serial port. There are several types of scales that are used, so I would like to save certain settings for the scale in my program. What is the best way to do this? Via app.config? Or should I put the values ​​in the database?

+3
source share
5 answers

app.config will be the easiest option for you. I think the database can overdo it a bit for some settings only, but if you want to use something outside of what VS offers (namely app.config), you can always hack a fast custom XML settings file. It all depends on what you want to do with it and how comfortable you are with other technologies.

+3
source

It really depends where will these configurations be used?

If you work with a distributed huge system, this means that these configurations are probably used / used by other systems. You better save it in a database with a common protocol with which other related systems agree.

, , ( xml, ), , .

+5

? , ur, ?

, app.config.

XML , .

, .

+1

.

, :

  • admin
  • ( Windows)
    ( )
  • There are many small settings that change very often.
+1
source

If this is a simpler and simpler way than app.config, you do not need to configure the database, and you can use simple built-in interfaces.

If you decide to go with a database, check out mysql for a simple file database that has a simple deployment scheme.

0
source

Source: https://habr.com/ru/post/1764446/


All Articles