All pastes #611849 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-10 02:38 UTC
rendered paste body
using System;

public class Foo {

public static CrossAppDomainDelegate del = new CrossAppDomainDelegate (foo);

public static void foo () { Console.WriteLine ("{0}", AppDomain.CurrentDomain.FriendlyName); }

public static void Main (string[] args) {
        AppDomain ad = AppDomain.CreateDomain ("test-domain");

        ad.DoCallBack (del);
        ad.DoCallBack (new CrossAppDomainDelegate (foo));
        ad.DoCallBack (delegate () { Console.WriteLine ("{0}", AppDomain.CurrentDomain.FriendlyName); });
}
}