Generate Object with values from a resource file

0

I have Resource File with the following values:

Name:     Value:
Teste1    TesteUm
Teste2    TesteDois

And I read as follows:

 ResourceManager rm = new ResourceManager("MyResource",
                Assembly.GetExecutingAssembly());


               var value = rm.GetString("Teste1");

But I would like to generate a dynamic object with values something that I could access as follows:

Resource.Teste1
// retorno TesteUm

Without having to access by the string name of the value I want to get.

Is there any way? whether with reflection or any other technology?

    
asked by anonymous 23.04.2018 / 21:26

0 answers