国产探花免费观看_亚洲丰满少妇自慰呻吟_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


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 夏邑县| 新绛县| 西宁市| 临湘市| 呼伦贝尔市| 双峰县| 图木舒克市| 长顺县| 札达县| 二连浩特市| 西峡县| 平潭县| 德化县| 弋阳县| 元江| 小金县| 邹城市| 永新县| 沧源| 无棣县| 湘西| 景德镇市| 桐梓县| 航空| 平阳县| 遂溪县| 兰坪| 邮箱| 博乐市| 吴忠市| 达拉特旗| 辰溪县| 连州市| 鄂州市| 渭源县| 聂荣县| 巴彦县| 贡觉县| 教育| 梁河县| 河间市|