In VB I use the following to load a DLL into memory, and then I call functions in that DLL when I need to:
oDLL = [Assembly].Load(b)
Where 'b' is a byte array that con开发者_StackOverflowtains the DLL. There are times when the loaded DLL will be updated and I need to send the new one to a customer. As it stands they have to restart the software that loads the DLL. I would rather the software be able to unload the loaded DLL and then load the new one. Anyone know of a way to do this?
It is rather nontrivial task. Short version: you can't unload assemblies in .net. Long version: you can unload app domain with all assemblies, so that you will have manage several app domains in your application.
精彩评论