2 using System
.Reflection
;
4 public interface IFoo
: ICloneable
{}
8 public void Foo
<T
> () where T
: IFoo
{}
10 public static int Main ()
12 MethodInfo mi
= typeof (Test
).GetMethod ("Foo");
13 Type t
= mi
.GetGenericArguments () [0];
14 Type
[] ifaces
= t
.GetGenericParameterConstraints ();
15 if (ifaces
.Length
!= 1)
17 if (ifaces
[0] != typeof (IFoo
))