Make the JIT run also the slow (for the interp:-) methods.
[mono.git] / mono / tests / delegate.cs
1 using System;
2 namespace Bah {
3 class Test {
4         delegate void SimpleDelegate ();
5         delegate string NotSimpleDelegate (int a);
6         
7         public int data;
8         
9         static void F () {
10                 Console.WriteLine ("Test.F from delegate");
11         }
12         public static string G (int a) {
13                 return "G got: " + a.ToString ();
14         }
15         public string H (int a) {
16                 return "H got: " + a.ToString () + " and " + data.ToString ();
17         }
18         public Test () {
19                 data = 5;
20         }
21         static int Main () {
22                 Test test = new Test ();
23                 SimpleDelegate d = new SimpleDelegate (F);
24                 NotSimpleDelegate d2 = new NotSimpleDelegate (G);
25                 NotSimpleDelegate d3 = new NotSimpleDelegate (test.H);
26                 d ();
27                 Console.WriteLine (d2 (2));
28                 Console.WriteLine (d3 (3));
29                 return 0;
30         }
31 }
32 }