[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / test-anon-35.cs
blob4079595e82b982eabb07d94b04ae64fdcd9ef6c6
1 using System;
3 public class ExceptionWithAnonMethod
5 public delegate void EmptyCallback();
6 static string res;
8 public static int Main()
10 try {
11 throw new Exception("e is afraid to enter anonymous land");
12 } catch(Exception e) {
13 AnonHandler(delegate {
14 Console.WriteLine(e.Message);
15 res = e.Message;
16 });
18 if (res == "e is afraid to enter anonymous land"){
19 Console.WriteLine ("Test passed");
20 return 0;
22 Console.WriteLine ("Test failed");
23 return 1;
26 public static void AnonHandler(EmptyCallback handler)
28 if(handler != null) {
29 handler();