c# - How to get EmbeddedResource from different assembly? -


i have assembly, mainlib.dll, resource retrieve with:

string resourcepath = string.format("mainlib.{0}", "embeddedresource.txt"); var assembly = assembly.getexecutingassembly(); stream inputstream = assembly.getmanifestresourcestream(resourcepath); 

this works fine. need move embeddedresource.txt it's own lib, resourcelib.dll.

how retrieve resourcelib.dll , use in mainlib.dll in separate dll?

you need resourcelib assembly embedded resource -

var assembly = assembly.getassembly(typeof(classnameinthatassembly)); 

or

var assembly = assembly.loadfrom("resourcelib"); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -