Can .NET AppDomains do this?

Posted by Eloff on Stack Overflow See other posts from Stack Overflow or by Eloff
Published on 2010-05-31T17:07:57Z Indexed on 2010/05/31 17:13 UTC
Read the original article Hit count: 179

Filed under:
|

I've spent hours reading up about AppDomains, but I'm not sure they work quite like I'm hoping.

If I have two classes, Foo in AppDomain #1, Bar in AppDomain #2:

App Domain #1 is the application. App Domain #2 is something like a plugin, and can be loaded and unloaded dynamically.

AppDomain #2 wants to create Foo and use it. Foo uses lots of classes in AppDomain #1 internally.

I don't want AppDomain #2 using object foo with reflection, I want it to use Foo foo, with all the static typing and compiled speed that goes with it. Can this be done considering that AppDomain #1, containing Foo, is never unloaded?

If so, does any remoting take place here when using Foo?

When I unload AppDomain #2, the type Foo is destroyed?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET