终极入门级:) 哈哈~ 留个纪念。
//
// 在指定应用程式域中执行代码
//
//
//
using System;
using System.Collections.Generic;
using System.Text;
namespace DomainTest
{
class Program
{
private static string strKey = "Key1";
static void Main(string[] args)
{
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);
Console.Read();
}
}
}
http://luoboqingcai.cnblogs.com/archive/2006/06/26/435596.html
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




