1 using System.Collections;
3 using System.Reflection;
7 public delegate R Function<T1, T2, R>(T1 arg1, T2 arg2);
9 public static int Main ()
11 Delegate [] e = new Delegate [] {
12 new Function<IList,IList,int> (f2),
13 new Function<IList,object,int> (f2)
16 if ((int)e [0].DynamicInvoke (null, null) != 1)
19 if ((int) e [1].DynamicInvoke (null, null) != 2)
22 Console.WriteLine ("OK");
26 static int f2 (IList self, IList other) { return 1; }
27 static int f2 (IList self, object other) {return 2; }