c# - AppDomain and threading -


Actually, the little that I have understood, I have been able to search the Internet, have passed between the threads Application Domain Now, I have written the following code:

  const string ChildAppDomain = "BlahBlah"; Static zero main () {if (AppDomain.CurrentDomain.FriendlyName! = ChildAppDomain) {bool done = false; While (! Done) {AppDomain mainApp = AppDomain.CreateDomain (ChildAppDomain, Blank, AppDomain.CurrentDomain.SetupInformation); Try {mainApp.ExecuteAssembly (path.getFileName (application.ExecutablePath)); } Catch (Exception Pre) {// [Snip]} AppDomain.Unload (mainApp); }} Else {// snip} The rest of the program goes here}}  

This works fine and clicking on everything ... main thread in new version My program and main application starts running through the body My question is, how would I have to go back to parent AppDomain ? Is this possible? The one I am trying to achieve is sharing an example of a class between two domains.

You can not directly share examples of sections between AppDomain s To do this, you should get the class from MarshalByRefObject and use Remoting to use the example from second AppDomain .


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -