Search code examples
c#.netmigrationvisual-foxprofoxpro

Handling a large number of settings in a C# WinForms application?


I will (hopefully) be taking on a large project to migrate an enterprise Visual FoxPro application to C# 3.0 on .NET 3.5. I know that this application has a huge number of settings that have an impact on everything from multi-user/multi-site configurations to report properties. There's at least 150 different settings that are currently globally scoped.

The settings are currently just stored as bits in the application's database, which prevents them from being changed at the user level, since all instances share the same db.

My question is, do you know of any way to handle the storage of these settings that would allow them to be changed per user, without sacrificing performance? It would also need to be stored in a way that allows the values to be changed while the application is running. Any ideas would be appreciated.


Solution

  • The standard Settings.Settings file I believe offers you this functionality, including application or user scoped variables. Although I'm not 100% sure if changes are picked up without restarting the application.

    See here for more info: MSDN:Using Settings in C#