using System; public class GenExc : Exception { } public delegate void ThrowDelegate (); public class Gen { public void catcher (ThrowDelegate thrower) { try { thrower (); } catch (GenExc) { } } public static void staticCatcher (ThrowDelegate thrower) { try { thrower (); } catch (GenExc) { } } } public class main { static void throwObjectObject () { throw new GenExc (); } static void throwStringObject () { throw new GenExc (); } static int Main () { Gen go = new Gen (); try { go.catcher (new ThrowDelegate (main.throwObjectObject)); Gen.staticCatcher (new ThrowDelegate (main.throwObjectObject)); go.catcher (new ThrowDelegate (main.throwStringObject)); Gen.staticCatcher (new ThrowDelegate (main.throwStringObject)); } catch { return 1; } try { go.catcher (new ThrowDelegate (main.throwStringObject)); return 1; } catch { } try { Gen.staticCatcher (new ThrowDelegate (main.throwStringObject)); return 1; } catch { } try { go.catcher (new ThrowDelegate (main.throwObjectObject)); return 1; } catch { } try { Gen.staticCatcher (new ThrowDelegate (main.throwObjectObject)); return 1; } catch { } return 0; } }