1 using System.Collections.Generic;
8 public Type[] apply (C<X,Y> t)
14 public Type[] foo<A,B> ()
16 Q<A,B> q = new Q<A,B>();
20 public Type[] bar<A,B> ()
22 return new Type[] { typeof(X), typeof(Y), typeof(A), typeof(B) };
29 Type t = typeof (Dictionary<,>);
30 Type t2 = typeof (C<,>);
31 return t.IsGenericTypeDefinition && t2.IsGenericTypeDefinition;
35 class TypeofTest2<X,Y> {
37 Type t = typeof (Dictionary<,>);
38 Type t2= typeof (C<,>);
39 return t.IsGenericTypeDefinition && t2.IsGenericTypeDefinition;
44 public static int Main () {
45 C<int,string> c = new C<int,string>();
46 Type[] types = c.foo<float,string> ();
47 foreach (Type t in types)
48 Console.WriteLine (t);
49 if (types [0] != typeof (int))
51 if (types [1] != typeof (string))
53 if (types [2] != typeof (float))
55 if (types [3] != typeof (string))
58 if (!new TypeofTest().Bla())
60 if (!new TypeofTest2<int, double>().Bla())