3 public class GenExc<S,T> : Exception {
6 public delegate void ThrowDelegate ();
9 public void catcher<S> (ThrowDelegate thrower) {
17 public static void staticCatcher<S> (ThrowDelegate thrower) {
27 static void throwObjectObject () {
28 throw new GenExc<object, object> ();
31 static void throwStringObject () {
32 throw new GenExc<string, object> ();
36 Gen<object> go = new Gen<object> ();
39 go.catcher<object> (new ThrowDelegate (main.throwObjectObject));
40 Gen<object>.staticCatcher<object> (new ThrowDelegate (main.throwObjectObject));
41 go.catcher<string> (new ThrowDelegate (main.throwStringObject));
42 Gen<object>.staticCatcher<string> (new ThrowDelegate (main.throwStringObject));
49 go.catcher<object> (new ThrowDelegate (main.throwStringObject));
55 Gen<object>.staticCatcher<object> (new ThrowDelegate (main.throwStringObject));
62 go.catcher<string> (new ThrowDelegate (main.throwObjectObject));
68 Gen<object>.staticCatcher<string> (new ThrowDelegate (main.throwObjectObject));