My Windows application GUI is accepting some required application configuration fields from the user. I need to store them of course, but I wanna hide these fields from the user.
- I cannot use database to store these configs.
- I want to avoid using app.config either. (No app.config encryption)
Any suggestions, Where and in which format i should store fields. (Field example is: Accepting database User credentials, Task Schedule info etc.)
I would use an XML file (encrypt if you feel its necessary) and use
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)to store it in the
%AppData%section of the user’s file system.Additionally, you may write a Settings class which you serialize to disk and deserialize to memory — this could save you some persistance logic with the XML namespace.