如何访问另一个程序集的.resx?

| 我有一个程序集,其中包含一个Messages.resx,其中包含GUI消息字符串,例如Yes,No,OK,Cancel,Open等。我的项目引用了该程序集。我该如何使用它们?     
已邀请:
在资源编辑器中,只需将资源标记为“ 0”即可。默认情况下,访问修饰符为
internal
。然后您就可以正常使用了。 如果不公开,则使用
InternalsVisibleTo
装配级属性。     
使用ResourceManager类
  // Retrieve the resource.
  ResourceManager rm = new ResourceManager(\"Messages\" ,Assembly.Load(assemblyPath));
  string greeting = rm.GetString(\"Greeting\");
希望这可以帮助     

要回复问题请先登录注册