Pass and execute delegate in separate AppDomain

后端 未结 4 1840
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 13:27

I want to exceute some piece of code in separate AppDomain with delegate. How can I do this?

UPD1: some more details about my problem My program pro

4条回答
  •  庸人自扰
    2020-12-04 14:00

    In order to execute a delegate on another AppDomain you can use System.AppDomain.DoCallBack(). The linked MSDN page has an excellent example. Note that You can only use delegates of type CrossAppDomainDelegate.

提交回复
热议问题