2 using System
.Collections
;
17 if (typeof (C
) != typeof (A
.B
.C
))
18 error
+= " 'typeof' keyword,";
21 if (o0
.GetType() != typeof (A
.B
.C
))
22 error
+= " 'new' keyword,";
25 if (o1
.GetType () != typeof (A
.B
.C
))
26 error
+= " type declaration,";
28 object o2
= new A
.B
.C ();
30 error
+= " 'is' keyword,";
34 error
+= " 'as' keyword,";
40 error
+= " type cast,";
47 error
+= " invocation-or-cast,";
50 object o6
= new C
[1];
52 if (o6
.GetType ().GetElementType () != typeof (A
.B
.C
))
53 error
+= " array creation,";
55 if (typeof (C
[]).GetElementType () != typeof (A
.B
.C
))
56 error
+= " composed cast (array),";
58 ArrayList a
= new ArrayList ();
67 error
+= " 'foreach' statement,";
70 if (error
.Length
!= 0)
71 throw new Exception ("The following couldn't resolve C as A+B+C:" + error
);
75 public static void Main()