Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / delegate8.cs
1 using System;
2 using System.Threading;
3
4 // Regression test for bug #59299
5
6 public class Test
7 {
8         delegate void M(ref object x, ref object y);
9         
10         public static void Foo(ref object x, ref object y)
11         {
12                 x = 20;
13                 y = 30;
14         }
15         
16         public static int Main()
17         {
18                 IAsyncResult ar;
19                 M m = new M(Foo);
20                 object x1 = 10, x2 = 10;
21
22                 ar = m.BeginInvoke(ref x1, ref x2, null, null);
23                 
24                 m.EndInvoke(ref x1, ref x2, ar);
25                 
26                 if ((int)x1 != 20 || (int)x2 != 30)
27                         return 1;
28                         
29                 return 0;
30         }
31 }