Reputation: 26227
I've recently found the resx
resources feature of C#/VS2008. However, I have trouble finding information about what they are normally used for.
For example, I want to have a "static string" defined somewhere in my project, such as a CSS class that should be used in certain circumstances. Is it a good idea to define that string as a resource for my project? Or should I just define a class with a bunch of const string
for these purposes?
Upvotes: 0
Views: 492
Reputation: 22636
Resource files should generally be used for strings that need internationalisation (user interface messages typically).
Where you have strings like file paths and such like that need to be changeable without re-compiling the application these should go in the app configuration files.
Where you have genuine constants (such as your example looks like) these should be defined as const strings in the code.
Upvotes: 4