Quantcast
Channel: Getting a string dynamically from strings resources - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Getting a string dynamically from strings resources

0
0

I am working on a localised C#.NET application and we are using a strings.resx file to translate hardcoded strings in the application. I use the following code to extract them:

using MyNamespace.Resources

...

string someString = strings.someString;

But, now I want to be able to define the name of the string in the call, something like this:

string someString = GetString("someString");

I have been toying a little with the ResourceManager, but i can't find a way to direct it to my strings.resx file.

How do I do that?


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images