Save application preferences... registry/file?

Posted by spender on Stack Overflow See other posts from Stack Overflow or by spender
Published on 2010-12-23T00:23:37Z Indexed on 2010/12/23 0:54 UTC
Read the original article Hit count: 195

Filed under:
|
|
|

Where is the best place to store application preferences?

In particular, I'd like to save preferences for a media player such as volume levels and the like. Two candidates spring to mind... file and registry. Which would be more appropriate?

As a follow up to this, I'm also wondering if there are any APIs that aid in creating application specific settings.

Unless someone advises me that this is wrong, I'd like to save stuff either in HKCU... or HKLM/Software/MyCompanyName/MyAppName/Key for the registry, or in %APPDATA\MyCompanyName\MyAppName\someTypeOfSettingsFile.

As these seem to be commonly used for such settings, I'd assume that .Net makes it easy to store settings in these locations. Is there a simple high level API that can .Net offer me to read and write settings to these common locations?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET