国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

在指定應用程序域中執行代碼

2019-11-18 17:08:01
字體:
來源:轉載
供稿:網友

超級入門級:) 哈哈~ 留個紀念。
//
// 在指定應用程序域中執行代碼
//
//
//


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.VEVb.com/archive/2006/06/26/435596.html


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 太和县| 巴楚县| 元朗区| 宁强县| 济宁市| 青浦区| 汕头市| 柳江县| 汝城县| 乌海市| 迁安市| 灵寿县| 金湖县| 西青区| 称多县| 墨江| 桃园市| 天镇县| 和平区| 榆中县| 鹰潭市| 清镇市| 汝阳县| 册亨县| 齐河县| 耒阳市| 荃湾区| 彭山县| 宁都县| 石城县| 繁昌县| 清河县| 罗平县| 随州市| 隆化县| 枣庄市| 当涂县| 东兰县| 邹平县| 海安县| 郸城县|