开发者

How to access resources from an external assembly

开发者 https://www.devze.com 2022-12-26 07:49 出处:网络
I want to create a vb.开发者_JAVA百科net project that I will use to only hold image and string resources that I will need in multiple projects.

I want to create a vb.开发者_JAVA百科net project that I will use to only hold image and string resources that I will need in multiple projects.

What I can't figure out is how do I access these resources using code from other projects.


You'll need to load the assembly by either referencing it in your projects or calling Assembly.Load to load the actual DLL files and create a new object called ResourceManager passing along the assembly you loaded or the type of the assembly (if you referenced it in your project).

Then make calls from the Resource manager (GetString, GetInt, GetImage, etc) for the different things the satellite assembly holds.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号