Storage of String constants
-
Ok, here's a simple/stupid question. Where do most people store string constants, for example informational/error messages, for their applications? I want to make sure they're somewhere that I can change the strings without having to recompile. I know some of the options are web.config, using resource files and System.Resources.ResourceManager, or storing the constant strings in a static class. What is used most often? Note that I'm not worried about Internationalization/Localization, just storing the strings. I would like to be able to have html tags in the strings, though. Thanks for any advice. Scott
-
Ok, here's a simple/stupid question. Where do most people store string constants, for example informational/error messages, for their applications? I want to make sure they're somewhere that I can change the strings without having to recompile. I know some of the options are web.config, using resource files and System.Resources.ResourceManager, or storing the constant strings in a static class. What is used most often? Note that I'm not worried about Internationalization/Localization, just storing the strings. I would like to be able to have html tags in the strings, though. Thanks for any advice. Scott
If you need to avoid re-compiling the application when you change it, keep it in an XML file. Write a class which reads this XML file and return the string.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions