5 public static readonly object[] test
= new object[] { 1, "foo", 3.14 }
;
6 public static readonly object[] test_types
= new object[] { typeof(int), typeof(string), typeof(double) }
;
8 public delegate void FOO(string s
, params object[] args
);
10 public static void foo(string s
, params object[] args
)
12 if (args
.Length
!= test
.Length
)
13 throw new System
.Exception("Length mismatch during " + s
+ " invocation");
14 for (int i
= 0; i
< args
.Length
; ++i
)
15 if (args
[i
].GetType() != test_types
[i
])
16 throw new System
.Exception("Type mismatch: " + args
[i
].GetType() + " vs. " + test_types
[i
]);
19 public static void Main()