Knowing the assembly name and resource file, you can load it using reflection.
var assembly = Assembly.LoadFrom("ResourcesLib.DLL");
var rm = new ResourceManager("ResourcesLib.Messages", assembly);
var x = rm.GetString("Hi");
To list all keys and values, you can use ResourceSet
var assembly = Assembly.LoadFrom("ResourcesLib.DLL");
var rm = new ResourceManager("ResourcesLib.Messages", assembly);
var rs = rm.GetResourceSet(CultureInfo.CurrentCulture, true, true);
foreach (DictionaryEntry r in rs)
{
var key = r.Key.ToString();
var val = r.Value.ToString();
}
If you don't have access to lib resources, you can see what namespaces, classes and everything else are through Reflector as mentioned by Leo.
source
share