Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access another assembly's .resx?

Tags:

c#

.net

resx

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?

like image 724
Louis Rhys Avatar asked May 26 '11 06:05

Louis Rhys


1 Answers

In the resource editor just mark the resources as public. By default the access modifier is internal. Then you can use it normally.

If making it public is not an option then use InternalsVisibleTo assembly level attribute.

like image 110
InBetween Avatar answered Oct 20 '22 04:10

InBetween