Search code examples
c#.netconstants

Should I store my global constants in resources file (.resx) or in classes?


I have a plenty of them of different form and types. Of course I will not store a bitmap as const, and I know about localization strings, but what should I do with other constants?


Solution

    • Put constants that relate to UI display in resources.
    • Put "constants" relating to application configuration like connection strings in app.config.
    • Put constants that relates to program flow in C# classes.