Best way to provide software settings?
Posted
by claws
on Stack Overflow
See other posts from Stack Overflow
or by claws
Published on 2010-03-31T19:09:04Z
Indexed on
2010/03/31
19:13 UTC
Read the original article
Hit count: 305
I'm using C# .NET.
In my software I'm providing settings dialog through which user can set the application settings which I want to save to a file.
Requirements (typical):
- Every class I defined uses some part of these settings. So, these should be global to all classes.
- These should be loaded while software is started.
- When ever user changes settings and clicks 'save'/'apply'. Current settings should change.
I am wondering what is the best way to do this? Also, what is the best way to save these settings to disk? I mean should I create a Settings
class object and serializing it to 'settings.dat' or provide an structured file like XML/JSON
© Stack Overflow or respective owner