Using the System.Resources Namespace
Ok,
I've added some values in the Resource section of my project. Just the dataabse name and server name. I'm having trouble trying to access that data. Does anyone know where a good web page is that talks about this or can someone guide me in the right direction?
Should I even use the resources section for should I use and xml file or what?
My goal is to have value in one place kinda like ini files with VB6 that you can change without have to recompile.
Thanks all.
jb
[526 byte] By [
jcb1269] at [2007-11-11 9:59:02]

# 1 Re: Using the System.Resources Namespace
Use the settings property of your project. Open the properties page of your project and click the settings tab. You can name your setting, indicate the type and scope (application/user) and the value. You can then retreive the value with:
My.Settings.[Setting Name]
# 2 Re: Using the System.Resources Namespace
Ok, which is the preferred method of use today. Using the Resource setting and setting values or using the Setting section which writes to the app.config file. I just did both and they work the same it seems. Is it just a "what you like to do" things or is one way better than the other.
So I guess to sum it up is: What should we be using?
Thanks for taking the time to listen...
jb
# 3 Re: Using the System.Resources Namespace
IMO, the purpose of string resources is for values that may be localized for different cultures and/or languages, such as text that appears on the screen. Values that will not be localized, such as connection strings or other configuration data, belong in .config files.