7 abstract class B1
<T1
, T2
>
9 public abstract void Test
<U
> (U x
) where U
: struct, T1
, T2
;
12 abstract class B2
<T1
, T2
>
14 public abstract void Test
<U
> (U x
) where U
: class, T1
, T2
;
17 class C1
: B1
<S
, ValueType
>
19 public override void Test
<U
> (U x
)
24 class C2
: B2
<string, object>
26 public override void Test
<U
> (U x
)
33 public static int Main ()
35 var m
= typeof (C1
).GetMethod ("Test");
36 var ta
= m
.GetGenericArguments ()[0].GetGenericParameterConstraints ();
40 m
= typeof (C2
).GetMethod ("Test");
41 ta
= m
.GetGenericArguments ()[0].GetGenericParameterConstraints ();
45 Console
.WriteLine ("ok");