I try to get a value of ressource.resx and I can't.
I do :
foreach (string certif in ContactCertifications)
{
Type calledType = Type.GetType("TestNamespace.Resources");
String s = (String)calledType.InvokeMember(certif,BindingFlags.InvokeMethod
| BindingFlags.Public |BindingFlags.Static,null,null,null); }
certif = "PRG_CARTV"
calledType is : {Name = "Resources" FullName = "TestNamespace.Resources"} and when I'm in line "String s = (String)calledType" I have an error : "Method 'TestNamespace.Resources.PRG_CARTV' not found."
And when I have String s = TestNamespace.Resources.PRG_CARTV;
it's work, so I don't understend..
When I do simply :
var myManager = new ResourceManager(typeof(Resources));
var myString = myManager.GetString("PRG_CARTV");
it's doesn't work, I have a error : "Can not find appropriate resources for the specified culture or neutral culture. Make sure \ "TestNamespace.Ressources.resources \" has been correctly embedded or linked in the assembly ..."