如何访问其他程序集的.resx? [英] How to access another assembly's .resx?
本文介绍了如何访问其他程序集的.resx?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个组件,它包括,除其他事项外,一个Messages.resx其中包含GUI的消息,例如是,否,确定,取消,打开,等我的项目引用该组件的字符串。我该如何使用他们?
I have an assembly which contains, among other things, a Messages.resx which contains strings of GUI messages such as Yes, No, OK, Cancel, Open, etc. My project references this assembly. How can I use them?
推荐答案
在资源编辑器刚刚标记的公共资源为
。默认情况下,访问修饰符是内部
。然后你就可以正常使用了。
In the resource editor just mark the resources as public
. By default the access modifier is internal
. Then you can use it normally.
如果使其成为公众不是一个选项,然后使用 InternalsVisibleTo
汇编级属性。
If making it public is not an option then use InternalsVisibleTo
assembly level attribute.
这篇关于如何访问其他程序集的.resx?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文