5 static int TestGeneral ()
9 throw new ApplicationException ();
10 } catch when (x
> 0) {
12 } catch when (x
< 0) {
19 static int TestSpecific ()
22 throw new ApplicationException ();
23 } catch (Exception e
) when (Foo (delegate { Console.WriteLine (e); }
)) {
25 Console
.WriteLine (e
);
28 } catch (Exception e
) when (e
is InvalidOperationException
) {
29 Console
.WriteLine (e
);
32 while (paramIndex
< 3) {
37 } catch (ApplicationException
) {
42 static bool Foo (Action a
)
48 public static int Main ()
50 var r
= TestGeneral ();
58 Console
.WriteLine ("ok");