surajguptha
asked on
Resx Problem
Hi,
I am using a resx file in my project which has key, value pairs. I have used a resx file so that a user will have to just change the resx file values to set some configuration values. I use a resourcemanager class's getString function to get the strings from the resx file. I am using the .EXE now.
The problem is that when i change the values of the resx file, the changed values are not used by the EXE.
Can anyone help me?
Thanks,
Suraj
I am using a resx file in my project which has key, value pairs. I have used a resx file so that a user will have to just change the resx file values to set some configuration values. I use a resourcemanager class's getString function to get the strings from the resx file. I am using the .EXE now.
The problem is that when i change the values of the resx file, the changed values are not used by the EXE.
Can anyone help me?
Thanks,
Suraj
you need to compile resx to a temporary .resources file in order to embed it into a DLL
try editing your resx files using note pad
The Resx files are compiled and merged with assembly. Every time you change them you need to build the assembly. So i will suggest you to use the Configuratiojn files for configuration values.
Jatinder
Jatinder
ASKER
Hi Jatinder,
Can configuration files be read as easily as an resx can be read using resourcemanager?? Is there a class to read the config files easily??
regards,
Suraj
Can configuration files be read as easily as an resx can be read using resourcemanager?? Is there a class to read the config files easily??
regards,
Suraj
Yes, there is the ConfigurationSettings.AppS ettings property
Bob
Bob
ASKER
Hey Bob,
I cannot understand what you mean by the ConfigurationSettings.AppS ettings property. Can u kindly explain?
I cannot understand what you mean by the ConfigurationSettings.AppS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yeah, that's what I meant :)
Bob
Bob
ASKER
Cool. Just incase i want to use another config file other than the app.config how can i read the key, value pairs?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Bob: that's nice article.
@Suraj:
In case you wish to use simple xml file then you can use the XMLReader class for reding the xml. But using config file is easy as it can be read as key vakue pair. You can even use plain text file. Then you will be required to read and parse the text from file.
And if you want to complicate the life you can use the registry for this purpose.
Jatinder
@Suraj:
In case you wish to use simple xml file then you can use the XMLReader class for reding the xml. But using config file is easy as it can be read as key vakue pair. You can even use plain text file. Then you will be required to read and parse the text from file.
And if you want to complicate the life you can use the registry for this purpose.
Jatinder