Merge pull request #4935 from lambdageek/dev-handles-may
[mono.git] / mcs / tests / dtest-011.cs
1 using System;
2
3 class C
4 {
5         void foo (int i)
6         {
7                 Console.WriteLine ("Got int: {0}", i);
8         }
9
10         void foo (string message)
11         {
12                 throw new ApplicationException ();
13         }
14
15         static void foo_static (long l)
16         {
17                 Console.WriteLine ("Got static long: {0}", l);
18         }
19         
20         static int MethodBest (short d)
21         {
22                 return 1;
23         }
24         
25         static int MethodBest (dynamic d)
26         {
27                 return -1;
28         }
29
30         void test ()
31         {
32                 dynamic d = 1;
33                 foo (d);
34                 foo_static (d);
35         }
36
37         public static int Main ()
38         {
39                 new C ().test ();
40                 
41                 if (MethodBest (1) != 1)
42                         return 1;
43                 
44                 return 0;
45         }
46 }