[CI] ignore appdomain-unload-asmload.exe on interp and full-aot
[mono.git] / mono / tests / bug-479763.2.cs
1 using System;
2
3 public class Foo
4 {
5     public event EventHandler Event;
6
7     public void RaiseEvent()
8     {
9         Event(this, new EventArgs());
10     }
11
12     public void AddHandler<T>(string target)
13     {
14             Action<object, EventArgs> fn = (sender, e) => Console.WriteLine(target);
15             EventHandler handler = Delegate.CreateDelegate(typeof(EventHandler),
16                             fn.Target, fn.Method) as EventHandler;
17
18             Event += handler;
19     }
20 }
21
22 public static class Program
23 {
24     public static void Main()
25     {
26         var thing = new Foo();
27
28         thing.AddHandler<Type>("hello");
29         thing.RaiseEvent();
30         thing.AddHandler<Type>("there");
31     }
32 }