2 using System.Collections;
15 if (typeof (C) != typeof (A.B.C))
16 error += " 'typeof' keyword,";
19 if (o0.GetType() != typeof (A.B.C))
20 error += " 'new' keyword,";
23 if (o1.GetType () != typeof (A.B.C))
24 error += " local declaration,";
26 object o2 = new A.B.C ();
28 error += " 'is' keyword,";
32 error += " 'as' keyword,";
38 error += " type cast,";
45 error += " invocation-or-cast,";
48 object o6 = new C [1];
50 if (o6.GetType ().GetElementType () != typeof (A.B.C))
51 error += " array creation,";
53 if (typeof (C []).GetElementType () != typeof (A.B.C))
54 error += " composed cast (array),";
56 ArrayList a = new ArrayList ();
65 error += " 'foreach' statement,";
68 if (error.Length != 0)
69 throw new Exception ("The following couldn't resolve C as A+B+C:" + error);
73 public static void Main()