2 using System
.Reflection
;
4 public static class Program
6 class BaseType
<T1
, T2
>
11 public static void blah () { }
14 class DerivedType
<T
> : BaseType
<string, T
>
16 public static void blah2 () { }
19 public static int Main (string[] args
)
21 MethodInfo method
= typeof (BaseType
<,>).GetMethod ("blah");
22 Delegate del
= Delegate
.CreateDelegate (typeof (Action
), null, method
, true);
27 } catch (InvalidOperationException
) {
32 Console
.WriteLine ("1");
36 method
= typeof (DerivedType
<>).GetMethod ("blah2");
37 del
= Delegate
.CreateDelegate (typeof (Action
), null, method
, true);
42 } catch (InvalidOperationException
) {
47 Console
.WriteLine ("2");
51 Console
.WriteLine ("OK");