AppDomain.DoCallBack : AppDomain « System « C# / C Sharp by API






AppDomain.DoCallBack

  

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;

public class MainClass
{
    public static void Main()
    {
        List<AppDomain> ads = new List<AppDomain>();
        for (int i = 0; i < 10; i++)
        {
            AppDomain ad = AppDomain.CreateDomain(i.ToString());
            ad.DoCallBack(delegate { Type t = typeof(Uri); });
            ads.Add(ad);
        }
        Console.WriteLine("After loading System.dll into 10 AppDomains: {0}", Environment.WorkingSet);
    }

}

   
    
  








Related examples in the same category

1.AppDomain.CreateDomain
2.AppDomain.CreateInstance
3.AppDomain.CreateInstanceAndUnwrap
4.AppDomain.CreateInstanceFromAndUnwrap
5.AppDomain.CurrentDomain.FriendlyName
6.AppDomain.CurrentDomain
7.AppDomain.DefineDynamicAssembly
8.AppDomain.DomainUnload
9.AppDomain.FriendlyName
10.AppDomain.GetAssemblies
11.AppDomain.GetData
12.AppDomain.OnUnhandledException
13.AppDomain.ProcessExit
14.AppDomain.SetData
15.AppDomain.SetPrincipalPolicy
16.AppDomain.Unload