Z
ZhangZQ
Supposing I have a class "UserControl1 : System.Windows.Forms.UserControl"
in an Assembly "UI.dll", now I create an Application project and want to use
the "UserControl1" in another AppDomain,
private void CreateUIInAnotherDomain()
{
UI.UserControl1 ui =
(UI.Cls)domain.CreateInstanceFromAndUnwrap(@".\UI.dll", "UI.UserControl1");
this.Controls.Add(ui);
}
Obviously, the obove code is wrong, so Is it possible to make the
UserControl derived class run in another AppDomain?
Thank you!
in an Assembly "UI.dll", now I create an Application project and want to use
the "UserControl1" in another AppDomain,
private void CreateUIInAnotherDomain()
{
UI.UserControl1 ui =
(UI.Cls)domain.CreateInstanceFromAndUnwrap(@".\UI.dll", "UI.UserControl1");
this.Controls.Add(ui);
}
Obviously, the obove code is wrong, so Is it possible to make the
UserControl derived class run in another AppDomain?
Thank you!