超级入门级:) 哈哈~ 留个纪念。 namespace DomainTest static void Main(string[] args) // 跨程序域调用委托 // 在指定程序域中执行代码 Console.Read(); http://luoboqingcai.cnblogs.com/archive/2006/06/26/435596.html
//
// 在指定应用程序域中执行代码
//
//
//
using System;
using System.Collections.Generic;
using System.Text;
{
class Program
{
private static string strKey = “Key1”;
{
AppDomain domaintest = AppDomain.CreateDomain(“Domaintest”);
string strVal = “Value1”;
domaintest.SetData(strKey, strVal);
CrossAppDomainDelegate callback = delegate
{
// 取得当前程序域
AppDomain domain = AppDomain.CurrentDomain;
Console.WriteLine(string.Format(“Value: {0} In {1}”, domain.GetData(strKey), domain.FriendlyName));
};
domaintest.DoCallBack(callback);
}
}
}
在指定应用程序域中执行代码_c#应用
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 在指定应用程序域中执行代码_c#应用
相关推荐
- 暂无文章
