I am working on a Windows Forms application in C#/.Net. I want to use a resource file that contains translations of my strings. My my project in visual studio I have the following hierarchy:
- Project
- CS files ...
- Resources\
- resource.en-US.resx
I am trying to read in the resource file as follows:
m_ResourceReader = new ResXResourceReader("resources/resource.en-US.resx");
When I run this project, Visual Studio seems to look for the resources folder in the bin/Debug output folder of my project.
My questions are:
- What is the right way to reference a resource file?
- I would like my installer to place this resource file under my application's folder under Program Files\MyApp\resources\resource.en-US.resx. What would be the way to make ResXResourceReader read it from that location.
Thanks for your help.
-Raj