var asm = Assembly.GetEntryAssembly();
this.Image = Properties.Resources.ResourceManager
.GetString(logicalOptions.GetType().Name);
有没有办法检索动态发现的程序集的ResourceManager
?
我想访问ResourceManager
程序集的asm
。
由于
答案 0 :(得分:1)
private ResourceManager GetResourceManager(Assembly assembly)
{
// Guess namespace name
var namespaceName = Path.GetFileNameWithoutExtension(assembly.CodeBase);
namespaceName = namespaceName + ".Properties.Resources";
return new ResourceManager(namespaceName, assembly);
}